Skip to content

Commit

Permalink
Merge pull request #1 from Cotix/master
Browse files Browse the repository at this point in the history
Fetch all objects to include in one query to improve performance
  • Loading branch information
Cotix authored Jan 19, 2019
2 parents 8e32477 + f75006c commit ab59414
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flask_restless/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,7 @@ def get_all_inclusions(self, instance_or_instances):
# one instance. Otherwise, collect the resources to include for
# each instance in `instances`.
if isinstance(instance_or_instances, Query):
instances = instance_or_instances
instances = instance_or_instances.all()
to_include = set(chain(map(self.resources_to_include, instances)))
else:
instance = instance_or_instances
Expand Down

0 comments on commit ab59414

Please sign in to comment.