From b0b05e479a2e49e0d7c55a60af0dd300c771a199 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 21 Sep 2024 07:34:55 +1000 Subject: [PATCH] Ensure DBBACKUP_STORAGE_OPTIONS is a dict (#8153) (#8154) (cherry picked from commit 0cd493e96e1bae4365d84959a6717dfce163363b) Co-authored-by: Oliver --- src/backend/InvenTree/InvenTree/settings.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/backend/InvenTree/InvenTree/settings.py b/src/backend/InvenTree/InvenTree/settings.py index f11774a804a..6cccc3bd49d 100644 --- a/src/backend/InvenTree/InvenTree/settings.py +++ b/src/backend/InvenTree/InvenTree/settings.py @@ -170,10 +170,11 @@ # Default backup configuration DBBACKUP_STORAGE_OPTIONS = get_setting( - 'INVENTREE_BACKUP_OPTIONS', 'backup_options', None + 'INVENTREE_BACKUP_OPTIONS', + 'backup_options', + default_value={'location': config.get_backup_dir()}, + typecast=dict, ) -if DBBACKUP_STORAGE_OPTIONS is None: - DBBACKUP_STORAGE_OPTIONS = {'location': config.get_backup_dir()} INVENTREE_ADMIN_ENABLED = get_boolean_setting( 'INVENTREE_ADMIN_ENABLED', config_key='admin_enabled', default_value=True