database: read out all namespaces on init
If a namespace contains an invalid key reading out the namespace should correct the issue. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
c9a958f861
commit
42bdb42573
|
@ -89,6 +89,9 @@ class MoonrakerDatabase:
|
||||||
txn.put(b'database_version',
|
txn.put(b'database_version',
|
||||||
self._encode_value(DATABASE_VERSION),
|
self._encode_value(DATABASE_VERSION),
|
||||||
db=mrdb)
|
db=mrdb)
|
||||||
|
# Read out all namespaces to remove any invalid keys on init
|
||||||
|
for ns in self.namespaces.keys():
|
||||||
|
self._get_namespace(ns)
|
||||||
# Protected Namespaces have read-only API access. Write access can
|
# Protected Namespaces have read-only API access. Write access can
|
||||||
# be granted by enabling the debug option. Forbidden namespaces
|
# be granted by enabling the debug option. Forbidden namespaces
|
||||||
# have no API access. This cannot be overridden.
|
# have no API access. This cannot be overridden.
|
||||||
|
|
Loading…
Reference in New Issue