Skip to content

Commit

Permalink
#141: Set LIKE operator on WHERE filter to do wildcard searches
Browse files Browse the repository at this point in the history
- This should allow these types of searches to provide more accurate results, where previously none could be found
  • Loading branch information
MRichards99 committed Sep 29, 2020
1 parent e58cbae commit acc9672
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/icat/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def apply_filter(self, query):
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)
where_filter = self.create_condition(self.field, "like", f"%{self.value}%")
elif self.operation == "lt":
where_filter = self.create_condition(self.field, "<", self.value)
elif self.operation == "lte":
Expand Down

0 comments on commit acc9672

Please sign in to comment.