Skip to content

Commit 45b7ef1

Browse files
lucemiapauricthelodger
authored andcommitted
fix ImproperlyConfigured
1 parent 9a3b1d1 commit 45b7ef1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

django_hashedfilenamestorage/storage.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from django.core.files import File
66
from django.core.files.storage import FileSystemStorage
77
from django.utils.encoding import force_text
8+
from django.core.exceptions import ImproperlyConfigured
89

910

1011
def HashedFilenameMetaStorage(storage_class):
@@ -16,7 +17,7 @@ def __init__(self, *args, **kwargs):
1617
new_kwargs = dict(kwargs, uniquify_names=False)
1718
super(HashedFilenameStorage, self).__init__(*args,
1819
**new_kwargs)
19-
except TypeError:
20+
except (TypeError, ImproperlyConfigured):
2021
super(HashedFilenameStorage, self).__init__(*args, **kwargs)
2122

2223
def _get_content_name(self, name, content, chunk_size=None):

0 commit comments

Comments
 (0)