mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fix returning default for unknown userconfig key
This commit is contained in:
@@ -49,7 +49,7 @@ class UserConfig(models.Model):
|
||||
|
||||
# Iterate down the hierarchy, returning the default value if any invalid key is encountered
|
||||
for key in keys:
|
||||
if type(d) is dict:
|
||||
if type(d) is dict and key in d:
|
||||
d = d.get(key)
|
||||
else:
|
||||
return default
|
||||
|
Reference in New Issue
Block a user