Commit 0abe1d76dad9d926ef90c44300b343aa2711a060
1 parent
4f770788
Exists in
master
and in
3 other branches
Adjusting file link creation error
Showing
1 changed file
with
2 additions
and
3 deletions
Show diff stats
file_link/forms.py
@@ -64,9 +64,8 @@ class FileLinkForm(forms.ModelForm): | @@ -64,9 +64,8 @@ class FileLinkForm(forms.ModelForm): | ||
64 | self._errors['file_content'] = [_("The file is too large. It should have less than 10MB.")] | 64 | self._errors['file_content'] = [_("The file is too large. It should have less than 10MB.")] |
65 | 65 | ||
66 | return ValueError | 66 | return ValueError |
67 | - | ||
68 | - | ||
69 | - if not self.instance.pk: | 67 | + |
68 | + elif not self.instance.pk: | ||
70 | self._errors['file_content'] = [_('This field is required.')] | 69 | self._errors['file_content'] = [_('This field is required.')] |
71 | 70 | ||
72 | return ValueError | 71 | return ValueError |