Commit 0abe1d76dad9d926ef90c44300b343aa2711a060

Authored by Zambom
1 parent 4f770788

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 64 self._errors['file_content'] = [_("The file is too large. It should have less than 10MB.")]
65 65  
66 66 return ValueError
67   -
68   -
69   - if not self.instance.pk:
  67 +
  68 + elif not self.instance.pk:
70 69 self._errors['file_content'] = [_('This field is required.')]
71 70  
72 71 return ValueError
... ...