Skip to content

Commit

Permalink
sqlite: delete_node: don't assume the key is cached in self._ids
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop committed Oct 3, 2023
1 parent cd9e41c commit f98617a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sqltrie/sqlite/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def has_node(self, key: TrieKey) -> bool:

def delete_node(self, key: TrieKey):
node = self._get_node(key)
del self._ids[key]
self._ids.pop(key, None)
self._conn.execute(
"""
DELETE FROM nodes WHERE id = ?
Expand Down

0 comments on commit f98617a

Please sign in to comment.