Skip to content

Commit

Permalink
redo adds back to same graph
Browse files Browse the repository at this point in the history
  • Loading branch information
rileywong311 committed Aug 15, 2023
1 parent ecac3dd commit 4172ba1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions brickschema/persistent.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,11 @@ def redo(self):
"SELECT * from changesets WHERE id = ?", (changeset_id,)
):
triple = pickle.loads(row["triple"])
graph = self.get_context(redo_record["graph"])
if row["is_insertion"]:
self.remove((triple[0], triple[1], triple[2]))
graph.remove((triple[0], triple[1], triple[2]))
else:
self.add((triple[0], triple[1], triple[2]))
graph.add((triple[0], triple[1], triple[2]))

def versions(self, graph=None):
"""
Expand Down

0 comments on commit 4172ba1

Please sign in to comment.