Skip to content

Commit

Permalink
fix asterisk handling
Browse files Browse the repository at this point in the history
  • Loading branch information
gsingers committed Feb 12, 2023
1 parent bbe5cb5 commit 8197933
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions week2/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ def process_filters(filters_input):
print("from: {}, to: {}".format(from_val, to_val))
# we need to turn the "to-from" syntax of aggregations to the "gte,lte" syntax of range filters.
to_from = {}
if from_val:
if from_val and from_val != "*":
to_from["gte"] = from_val
else:
from_val = "*" # set it to * for display purposes, but don't use it in the query
if to_val:
if to_val and to_val != "*":
to_from["lt"] = to_val
else:
to_val = "*" # set it to * for display purposes, but don't use it in the query
Expand Down

0 comments on commit 8197933

Please sign in to comment.