From 0abe1d76dad9d926ef90c44300b343aa2711a060 Mon Sep 17 00:00:00 2001 From: Zambom Date: Thu, 26 Jan 2017 10:34:03 -0200 Subject: [PATCH] Adjusting file link creation error --- file_link/forms.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/file_link/forms.py b/file_link/forms.py index 3319c45..2af554b 100644 --- a/file_link/forms.py +++ b/file_link/forms.py @@ -64,9 +64,8 @@ class FileLinkForm(forms.ModelForm): self._errors['file_content'] = [_("The file is too large. It should have less than 10MB.")] return ValueError - - - if not self.instance.pk: + + elif not self.instance.pk: self._errors['file_content'] = [_('This field is required.')] return ValueError -- libgit2 0.21.2