2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 03:25:42 +00:00

Load build order prefix setting

This commit is contained in:
Oliver Walters
2020-10-20 08:41:08 +11:00
parent 7aa473712f
commit 406d7bcf80
5 changed files with 26 additions and 3 deletions

View File

@ -62,6 +62,10 @@ class InvenTreeSetting(models.Model):
If it does not exist, return the backup value (default = None)
"""
# If no backup value is specified, atttempt to retrieve a "default" value
if backup_value is None:
backup_value = InvenTreeSetting.DEFAULT_VALUES.get(key, None)
try:
settings = InvenTreeSetting.objects.filter(key__iexact=key)