mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 09:51:22 -06:00
Initialize Config with empty dict
This commit is contained in:
parent
66ed39b4b7
commit
26d2da7b98
@ -43,7 +43,7 @@ class Config:
|
|||||||
must be re-instantiated each time it's necessary to check for updates to the cached config.
|
must be re-instantiated each time it's necessary to check for updates to the cached config.
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.config = cache.get('config')
|
self.config = cache.get('config') or {}
|
||||||
self.version = cache.get('config_version')
|
self.version = cache.get('config_version')
|
||||||
self.defaults = {param.name: param.default for param in PARAMS}
|
self.defaults = {param.name: param.default for param in PARAMS}
|
||||||
logger.debug("Loaded configuration data from cache")
|
logger.debug("Loaded configuration data from cache")
|
||||||
|
Loading…
Reference in New Issue
Block a user