Skip to content

Commit 9736e46

Browse files
committed
Short-circuit including results when not requested
1 parent 4897809 commit 9736e46

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

optimade/server/routers/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ def get_included_relationships(
166166
)
167167

168168
endpoint_includes: dict[Any, dict] = defaultdict(dict)
169+
170+
if not include_param:
171+
return []
172+
169173
for doc in results:
170174
# convert list of references into dict by ID to only included unique IDs
171175
if doc is None:

0 commit comments

Comments
 (0)