Skip to content

Commit 1bf7f2f

Browse files
committed
Fix enum/string checks
1 parent 52cc46b commit 1bf7f2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/settings/files_and_storages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
env("FILE_UPLOAD_STORAGE", default="local")
1515
)
1616

17-
if FILE_UPLOAD_STORAGE == "local":
17+
if FILE_UPLOAD_STORAGE == FileUploadStorage.LOCAL:
1818
MEDIA_ROOT_NAME = "media"
1919
MEDIA_ROOT = os.path.join(BASE_DIR, MEDIA_ROOT_NAME)
2020
MEDIA_URL = f"/{MEDIA_ROOT_NAME}/"
2121

22-
if FILE_UPLOAD_STORAGE == "s3":
22+
if FILE_UPLOAD_STORAGE == FileUploadStorage.S3:
2323
# Using django-storages
2424
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html
2525
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'

0 commit comments

Comments
 (0)