mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #34192 -- Preserved callable storage when it returns default_storage.
This commit is contained in:
committed by
Mariusz Felisiak
parent
e3a4cee081
commit
ef85b6bf0b
@@ -295,8 +295,9 @@ class FileField(Field):
|
||||
if kwargs.get("max_length") == 100:
|
||||
del kwargs["max_length"]
|
||||
kwargs["upload_to"] = self.upload_to
|
||||
if self.storage is not default_storage:
|
||||
kwargs["storage"] = getattr(self, "_storage_callable", self.storage)
|
||||
storage = getattr(self, "_storage_callable", self.storage)
|
||||
if storage is not default_storage:
|
||||
kwargs["storage"] = storage
|
||||
return name, path, args, kwargs
|
||||
|
||||
def get_internal_type(self):
|
||||
|
||||
Reference in New Issue
Block a user