From 3e331c08fb52b526dbc3bbbe92be463cf4283226 Mon Sep 17 00:00:00 2001 From: Benbb96 Date: Thu, 14 Apr 2022 23:45:19 +0200 Subject: [PATCH] Try to fix other tests --- helpdesk/validators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpdesk/validators.py b/helpdesk/validators.py index 01500a9a..1c0ccb24 100644 --- a/helpdesk/validators.py +++ b/helpdesk/validators.py @@ -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.')