Skip to content

Commit

Permalink
⚡️ (view) Don't fetch inverted adjacents for nested
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwoerpel committed Jul 25, 2024
1 parent 7a1aad8 commit d299b53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ftmstore_fastapi/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async def entity_list(
adjacents = []
entities = [e async for e in view.get_entities(query, retrieve_params)]
if retrieve_params.nested:
adjacents = await view.get_adjacents(entities)
adjacents = await view.get_adjacents(entities, inverted=False)
return EntitiesResponse.from_view(
request=request,
entities=entities,
Expand Down
5 changes: 5 additions & 0 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ def test_api_dataset_entities():
data = res.json()
assert data["total"] == 0

res = client.get("/entities?dataset=ec_meetings&schema=Event&limit=1&nested=true")
assert res.status_code == 200
data = res.json()
assert data["entities"][0]["properties"]["organizer"][0]["schema"] == "PublicBody"


def test_api_dataset_entity_detail():
res = client.get("/entities/addr-00177d9455d8e1b6a3f5530ea1e7e81ce1c8333f")
Expand Down

0 comments on commit d299b53

Please sign in to comment.