Skip to content

Commit

Permalink
#146: Change where include filter data is referenced
Browse files Browse the repository at this point in the history
  • Loading branch information
MRichards99 committed Oct 12, 2020
1 parent 2c8842c commit a089db4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/database/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def get_query_filter(filter):
elif filter_name == "limit":
return LimitFilter(filter["limit"])
elif filter_name == "include":
return IncludeFilter(filter)
return IncludeFilter(filter["include"])
elif filter_name == "distinct":
return DistinctFieldFilter(filter["distinct"])
else:
Expand Down
2 changes: 1 addition & 1 deletion common/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ class IncludeFilter(QueryFilter):
precedence = 5

def __init__(self, included_filters):
self.included_filters = included_filters["include"]
self.included_filters = included_filters
2 changes: 1 addition & 1 deletion common/icat/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class PythonICATIncludeFilter(IncludeFilter):
def __init__(self, included_filters):
self.included_filters = []
log.info("Extracting fields for include filter")
self._extract_filter_fields(included_filters["include"])
self._extract_filter_fields(included_filters)

def _extract_filter_fields(self, field):
"""
Expand Down

0 comments on commit a089db4

Please sign in to comment.