Commit e0b51192 authored by Serge S. Koval's avatar Serge S. Koval

Style fix

parent 72dd1157
......@@ -182,7 +182,7 @@ class FileUploadField(fields.TextField):
def pre_validate(self, form):
if (self.data
and len(self.data.filename)
and self.data.filename
and isinstance(self.data, FileStorage)
and not self.is_file_allowed(self.data.filename)):
raise ValidationError(gettext('Invalid file extension'))
......
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