mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-25 08:09:12 +01:00
Try to fix other tests
This commit is contained in:
parent
9320df0268
commit
3e331c08fb
@ -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.')
|
||||
|
Loading…
Reference in New Issue
Block a user