From 8cc9009ac0e6e34e59e7c672d9084242c8de09c3 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 26 Feb 2024 22:54:38 +0100 Subject: [PATCH] hotfix: create MEDIAR_ROOT directory --- openIMIS/openIMIS/settings.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openIMIS/openIMIS/settings.py b/openIMIS/openIMIS/settings.py index 105118b..33fae3e 100644 --- a/openIMIS/openIMIS/settings.py +++ b/openIMIS/openIMIS/settings.py @@ -488,6 +488,9 @@ def SITE_URL(): MEDIA_URL = "/file_storage/" MEDIA_ROOT = os.path.join(BASE_DIR, "file_storage/") +if not os.path.exists(MEDIA_ROOT): + os.makedirs(MEDIA_ROOT) + STORAGES = { "default": { "class": "core.filesystem.storage.FileSystemStorage",