Skip to content
Snippets Groups Projects
Commit bbdd3b4a authored by Martin Mareš's avatar Martin Mareš
Browse files

Fix bug in processing of content types

parent c502f843
No related branches found
No related tags found
No related merge requests found
......@@ -84,8 +84,8 @@ def validate_attachment(form, field):
if not ctype.is_allowed():
raise wtforms.ValidationError(f'Attachment type {mime_type} is not allowed in this course')
if extension not in ctype.allowed_exts:
extension = ctype.allowed_exts[0]
if extension not in ctype.extensions:
extension = ctype.extensions[0]
field.owl_mime_type = mime_type
field.owl_extension = extension
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment