database: sync namespace bugfix
Use the transaction object to overwrite keys so that we don't move the cursor. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
2b7a5ff035
commit
888fb58c4f
|
@ -500,7 +500,8 @@ class MoonrakerDatabase:
|
|||
else:
|
||||
decoded = self._decode_value(bval)
|
||||
if decoded != value[key]:
|
||||
cursor.put(self._encode_value(value[key]))
|
||||
new_val = self._encode_value(value[key])
|
||||
txn.put(key.encode(), new_val)
|
||||
new_keys.remove(key)
|
||||
remaining = cursor.next()
|
||||
for key in new_keys:
|
||||
|
|
Loading…
Reference in New Issue