Convert DATA_DIR to a Path object when fetching from ENV_TOKENS
This fixes the exceptions raised by code that expects it to be a Path object. For instance, the LMS sysadmin dashboard courses page expects DATA_DIR to be a Path object and throws a 500 Internal Server error if it isn't.
This commit is contained in:
@@ -154,7 +154,7 @@ ALLOWED_HOSTS = [
|
||||
]
|
||||
|
||||
LOG_DIR = ENV_TOKENS['LOG_DIR']
|
||||
DATA_DIR = ENV_TOKENS.get('DATA_DIR', DATA_DIR)
|
||||
DATA_DIR = path(ENV_TOKENS.get('DATA_DIR', DATA_DIR))
|
||||
|
||||
CACHES = ENV_TOKENS['CACHES']
|
||||
# Cache used for location mapping -- called many times with the same key/value
|
||||
|
||||
@@ -324,7 +324,7 @@ WIKI_ENABLED = ENV_TOKENS.get('WIKI_ENABLED', WIKI_ENABLED)
|
||||
|
||||
local_loglevel = ENV_TOKENS.get('LOCAL_LOGLEVEL', 'INFO')
|
||||
LOG_DIR = ENV_TOKENS['LOG_DIR']
|
||||
DATA_DIR = ENV_TOKENS.get('DATA_DIR', DATA_DIR)
|
||||
DATA_DIR = path(ENV_TOKENS.get('DATA_DIR', DATA_DIR))
|
||||
|
||||
LOGGING = get_logger_config(LOG_DIR,
|
||||
logging_env=ENV_TOKENS['LOGGING_ENV'],
|
||||
|
||||
Reference in New Issue
Block a user