Skip to content

Commit

Permalink
fix: fix internal server error when running DG API on its own #359
Browse files Browse the repository at this point in the history
  • Loading branch information
VKTB committed May 16, 2022
1 parent c674205 commit b0d3e06
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 b0d3e06

Please sign in to comment.