diff --git a/resotocore/resotocore/db/graphdb.py b/resotocore/resotocore/db/graphdb.py index c913bd72ba..094a85c077 100644 --- a/resotocore/resotocore/db/graphdb.py +++ b/resotocore/resotocore/db/graphdb.py @@ -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 diff --git a/resotocore/tests/resotocore/db/graphdb_test.py b/resotocore/tests/resotocore/db/graphdb_test.py index eab5a9c029..9a9bf61c0b 100644 --- a/resotocore/tests/resotocore/db/graphdb_test.py +++ b/resotocore/tests/resotocore/db/graphdb_test.py @@ -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