Skip to content

Commit b0b05e4

Browse files
Ensure DBBACKUP_STORAGE_OPTIONS is a dict (#8153) (#8154)
(cherry picked from commit 0cd493e) Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
1 parent 003ea5d commit b0b05e4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/backend/InvenTree/InvenTree/settings.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,11 @@
170170

171171
# Default backup configuration
172172
DBBACKUP_STORAGE_OPTIONS = get_setting(
173-
'INVENTREE_BACKUP_OPTIONS', 'backup_options', None
173+
'INVENTREE_BACKUP_OPTIONS',
174+
'backup_options',
175+
default_value={'location': config.get_backup_dir()},
176+
typecast=dict,
174177
)
175-
if DBBACKUP_STORAGE_OPTIONS is None:
176-
DBBACKUP_STORAGE_OPTIONS = {'location': config.get_backup_dir()}
177178

178179
INVENTREE_ADMIN_ENABLED = get_boolean_setting(
179180
'INVENTREE_ADMIN_ENABLED', config_key='admin_enabled', default_value=True

0 commit comments

Comments
 (0)