Skip to content

Commit

Permalink
Gracefully handle partially completed date range in timebox entry
Browse files Browse the repository at this point in the history
  • Loading branch information
neonbunny committed Oct 21, 2024
1 parent 5593b01 commit 0485252
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions event_tracker/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,8 +894,12 @@ def filter_search_builder(self):
elif condition == ">":
query_condition = "gte"
elif condition == "between":
query_condition = "range"
multivalue = True
if value1 and value2:
query_condition = "range"
multivalue = True
elif not value2:
# Handle the case that user has only partially completed the between form
query_condition = "gte"
else:
query_condition = "unknown_condition"

Expand Down

0 comments on commit 0485252

Please sign in to comment.