Skip to content

Commit

Permalink
[resotocore][fix] do not filter non none values (#1845)
Browse files Browse the repository at this point in the history
  • Loading branch information
aquamatthias authored Dec 4, 2023
1 parent 71091e9 commit b8fa776
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resotocore/resotocore/db/async_arangodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async def __anext__(self) -> Any:
try:
while True:
element = await self.get_next()
if element:
if element is not None:
return element
except StopAsyncIteration:
# iterator exhausted: all elements have been processed. Now yield all deferred edges.
Expand Down
2 changes: 1 addition & 1 deletion resotocore/tests/resotocore/db/graphdb_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ async def pv(q: str, path_or_pred: Union[str, Predicate], detail: Literal["attri
props_of_b = ["ctime", "f", "g", "h", "identifier", "kind", "name", "now"]
assert await pv("is(bla)", "reported.f", "values") == [23]
assert await pv("is(bla)", "reported.h.inner[*].inner[*].name", "values") == ["in_0_0", "in_0_1"]
assert await pv("is(bla)", "reported.g[*]", "values") == [1, 2, 3, 4]
assert await pv("is(bla)", "reported.g[*]", "values") == [0, 1, 2, 3, 4]
assert await pv("is(bla)", "reported", "attributes") == props_of_b
assert await pv("is(bla)", predicate_term.parse('reported=~"^[fgh]"'), "attributes") == ["f", "g", "h"]

Expand Down

0 comments on commit b8fa776

Please sign in to comment.