database: don't allow sync against an empty dict
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
f3cd177a02
commit
0bd12c8dec
|
@ -484,7 +484,7 @@ class MoonrakerDatabase:
|
|||
value: Mapping[str, DBRecord]
|
||||
) -> None:
|
||||
if not value:
|
||||
return
|
||||
raise self.server.error("Cannot sync to an empty value")
|
||||
db = self._get_db(namespace)
|
||||
new_keys = set(value.keys())
|
||||
with self.lmdb_env.begin(write=True, buffers=True, db=db) as txn:
|
||||
|
|
Loading…
Reference in New Issue