Skip to content

Commit

Permalink
Merge pull request #360 from ral-facilities/bugfix/500-internal-serve…
Browse files Browse the repository at this point in the history
…r-error-#359

500 Internal server error when running DG API on its own and sending Investigations request
  • Loading branch information
VKTB authored May 16, 2022
2 parents c674205 + b0d3e06 commit ca638a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions datagateway_api/src/common/filter_order_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ def apply_filters(self, query):
# Using `type()` because we only want the Python ICAT version, don't want
# the code to catch objects that inherit from the class e.g.
# `SearchAPIIncludeFilter`
if type(query_filter) is PythonICATIncludeFilter and isinstance(
query, SearchAPIQuery,
if (
Config.config.search_api
and type(query_filter) is PythonICATIncludeFilter
and isinstance(query, SearchAPIQuery)
):
query = query.icat_query.query
query_filter.apply_filter(query)
Expand Down

0 comments on commit ca638a7

Please sign in to comment.