Check for empty values

This commit is contained in:
Oliver Walters 2021-03-30 20:53:26 +11:00
parent 3a0c68bf5c
commit 3ddbb6a6cd

View File

@ -362,6 +362,10 @@ else:
# Extract database configuration from the config.yaml file
db_config = CONFIG.get('database', {})
# Default action if db_config not specified in yaml file
if not db_config:
db_config = {}
# If a particular database option is not specified in the config file,
# look for it in the environmental variables
# e.g. INVENTREE_DB_NAME / INVENTREE_DB_USER / etc