Skip to content

Commit f75006c

Browse files
committed
Fetch all objects to include in one query to improve performance massively
1 parent 8e32477 commit f75006c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_restless/views/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,7 @@ def get_all_inclusions(self, instance_or_instances):
14131413
# one instance. Otherwise, collect the resources to include for
14141414
# each instance in `instances`.
14151415
if isinstance(instance_or_instances, Query):
1416-
instances = instance_or_instances
1416+
instances = instance_or_instances.all()
14171417
to_include = set(chain(map(self.resources_to_include, instances)))
14181418
else:
14191419
instance = instance_or_instances

0 commit comments

Comments
 (0)