forked from extern/django-helpdesk
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