Skip to content

Commit

Permalink
Merge branch 'implement-search-api-where-filter-operators-#297' of gi…
Browse files Browse the repository at this point in the history
…thub.com:ral-facilities/datagateway-api into implement-search-api-where-filter-operators-#297
  • Loading branch information
VKTB committed Jan 25, 2022
2 parents bd15023 + 8b344ef commit b8ca890
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions datagateway_api/src/datagateway_api/icat/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,8 @@ def create_filter(self):
log.info("Creating condition for ICAT where filter")
if self.operation == "eq":
where_filter = self.create_condition(self.field, "=", self.value)
elif self.operation == "ne":
elif self.operation in ["ne", "neq"]:
where_filter = self.create_condition(self.field, "!=", self.value)
elif self.operation == "neq":
self.operation = "ne"
where_filter = self.create_filter()
elif self.operation == "like":
where_filter = self.create_condition(self.field, "like", f"%{self.value}%")
elif self.operation == "ilike":
Expand Down

0 comments on commit b8ca890

Please sign in to comment.