Skip to content

Commit

Permalink
#51: Use updated include filter
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Sep 11, 2019
1 parent 958da33 commit ce6beb7
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 @@ -330,8 +330,8 @@ def get_filtered_read_query_results(filter_handler, filters, query):
results = query.get_all_results()
if query.include_related_entities:
for query_filter in filters:
if list(query_filter)[0].lower() == "include":
return list(map(lambda x: x.to_nested_dict(query_filter["include"]), results))
if type(query_filter) is IncludeFilter:
return list(map(lambda x: x.to_nested_dict(query_filter.included_filters), results))
return list(map(lambda x: x.to_dict(), results))

finally:
Expand Down

0 comments on commit ce6beb7

Please sign in to comment.