only include setting in the settings that have a key

This commit is contained in:
Matthias 2021-07-30 23:25:45 +02:00
parent 7ed43f5a11
commit 369864574e

View File

@ -58,12 +58,13 @@ class BaseInvenTreeSetting(models.Model):
# Query the database
for setting in results:
settings.append({
"key": setting.key.upper(),
"value": setting.value
})
if setting.key:
settings.append({
"key": setting.key.upper(),
"value": setting.value
})
keys.add(setting.key.upper())
keys.add(setting.key.upper())
# Specify any "default" values which are not in the database
for key in cls.GLOBAL_SETTINGS.keys():