Fixed passing Storage instance

This commit is contained in:
Tris Forster 2022-12-21 08:22:14 +11:00
parent 432118ac58
commit 227ce5fccb

View File

@ -19,6 +19,9 @@ class CachedStorage(Storage):
if not cachedir:
cachedir = getattr(settings, 'CACHED_STORAGE_DIR', 'cache')
if isinstance(remote, Storage):
self.remote = remote
else:
self.remote = get_storage_class(remote)()
self.cachedir = cachedir
self.expires = expires