Skip to content

Commit

Permalink
#51: Update _get_results_with_include
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Sep 12, 2019
1 parent 01c0a1c commit 1b2a389
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/database_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@ def _get_results_with_include(filters, results):
:return: A list of nested dictionaries representing the entity results
"""
for query_filter in filters:
if list(query_filter)[0].lower() == "include":
return [x.to_nested_dict(query_filter["include"]) for x in results]
if type(query_filter) is IncludeFilter:
return [x.to_nested_dict(query_filter.included_filters) for x in results]


def _get_distinct_fields_as_dicts(results):
Expand Down

0 comments on commit 1b2a389

Please sign in to comment.