Skip to content

Commit

Permalink
[resoto][fix] Change node should also reflect ancestors in self (#1859)
Browse files Browse the repository at this point in the history
  • Loading branch information
aquamatthias authored Dec 15, 2023
1 parent 91e31f7 commit a18f6db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion resotocore/resotocore/db/graphdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ def update_resolved(
coll = self.node_history if history else self.vertex_name
return dedent(
f"""
FOR d in `{coll}` FILTER d._key!=@node_id and d.{prop.to}==@node_id
FOR d in `{coll}` FILTER d.{prop.to}==@node_id
UPDATE d WITH @patch in `{coll}`
COLLECT WITH COUNT INTO count
RETURN count
Expand Down
4 changes: 2 additions & 2 deletions resotocore/tests/resotocore/db/graphdb_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,8 @@ async def elements(history: bool) -> List[Json]:
async with await fn(query=model) as crs: # type: ignore
return [e async for e in crs]

assert len(await elements(False)) == 110
assert len(await elements(True)) == 111 # history includes the node itself
assert len(await elements(False)) == 111
assert len(await elements(True)) == 111


@mark.asyncio
Expand Down

0 comments on commit a18f6db

Please sign in to comment.