Skip to content

Commit

Permalink
Merge branch 'fix-versioned-graph-collection-redo' of github.com:rile…
Browse files Browse the repository at this point in the history
…ywong311/py-brickschema into rileywong311-fix-versioned-graph-collection-redo
  • Loading branch information
gtfierro committed Oct 3, 2023
2 parents 6ea7901 + 4172ba1 commit 97c953f
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 97c953f

Please sign in to comment.