fix: delete from namespaced storage when putting...
This commit is contained in:
parent
aa0e804965
commit
3b7aa42e0b
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ class AddonStorage:
|
|||
|
||||
def put(self, key:str, val:Any) -> None:
|
||||
cur = self.db.cursor()
|
||||
cur.execute("DELETE FROM documents WHERE name = ?", (key,))
|
||||
cur.execute(f"DELETE FROM documents_{self.name} WHERE name = ?", (key,))
|
||||
cur.execute(f"INSERT INTO documents_{self.name} VALUES (?, ?)", (key, json.dumps(val, default=str),))
|
||||
self.db.commit()
|
||||
|
||||
|
|
Loading…
Reference in a new issue