Skip to content

Commit

Permalink
#141: Add 'not equal' operation to ICAT WHERE filter
Browse files Browse the repository at this point in the history
- The primary used for this operation will be to add WHERE filters when a distinct filter is in a request, so distinct filters can accomodate multiple fields
  • Loading branch information
MRichards99 committed Aug 24, 2020
1 parent d41359f commit bda22f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/icat/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ def apply_filter(self, query):
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":
where_filter = self.create_condition(self.field, "!=", self.value)
elif self.operation == "like":
where_filter = self.create_condition(self.field, "like", self.value)
elif self.operation == "lt":
Expand Down

0 comments on commit bda22f4

Please sign in to comment.