Try to fix other tests

This commit is contained in:
Benbb96 2022-04-14 23:45:19 +02:00
parent 9320df0268
commit 3e331c08fb

View File

@ -16,10 +16,10 @@ def validate_file_extension(value):
# check if VALID_EXTENSIONS is defined in settings.py
# if not use defaults
if settings.VALID_EXTENSIONS:
if hasattr(settings, 'VALID_EXTENSIONS'):
valid_extensions = settings.VALID_EXTENSIONS
else:
valid_extensions = ['.txt', '.pdf', '.doc', '.docx', '.odt', '.jpg', '.png']
valid_extensions = ['.txt', '.pdf', '.doc', '.docx', '.odt', '.jpg', '.png', '.eml']
if not ext.lower() in valid_extensions:
raise ValidationError('Unsupported file extension.')