Commit b143fc9a authored by Alex GP's avatar Alex GP

Fixied file check before upload

parent 3dc0d6ee
...@@ -46,7 +46,7 @@ class UploadForm(form.BaseForm): ...@@ -46,7 +46,7 @@ class UploadForm(form.BaseForm):
super(UploadForm, self).__init__(helpers.get_form_data()) super(UploadForm, self).__init__(helpers.get_form_data())
def validate_upload(self, field): def validate_upload(self, field):
if not self.upload.has_file(): if not self.upload.data:
raise validators.ValidationError(gettext('File required.')) raise validators.ValidationError(gettext('File required.'))
filename = self.upload.data.filename filename = self.upload.data.filename
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment