mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: make target dates inclusive when filtering (#2276)
This commit is contained in:
parent
191aecaaac
commit
7b453dd6b5
@ -163,17 +163,17 @@ def filter_target_date(params, filter, method):
|
|||||||
for query in target_dates:
|
for query in target_dates:
|
||||||
target_date_query = query.split(";")
|
target_date_query = query.split(";")
|
||||||
if len(target_date_query) == 2 and "after" in target_date_query:
|
if len(target_date_query) == 2 and "after" in target_date_query:
|
||||||
filter["target_date__gt"] = target_date_query[0]
|
filter["target_date__gte"] = target_date_query[0]
|
||||||
else:
|
else:
|
||||||
filter["target_date__lt"] = target_date_query[0]
|
filter["target_date__lte"] = target_date_query[0]
|
||||||
else:
|
else:
|
||||||
if params.get("target_date", None) and len(params.get("target_date")):
|
if params.get("target_date", None) and len(params.get("target_date")):
|
||||||
for query in params.get("target_date"):
|
for query in params.get("target_date"):
|
||||||
target_date_query = query.split(";")
|
target_date_query = query.split(";")
|
||||||
if len(target_date_query) == 2 and "after" in target_date_query:
|
if len(target_date_query) == 2 and "after" in target_date_query:
|
||||||
filter["target_date__gt"] = target_date_query[0]
|
filter["target_date__gte"] = target_date_query[0]
|
||||||
else:
|
else:
|
||||||
filter["target_date__lt"] = target_date_query[0]
|
filter["target_date__lte"] = target_date_query[0]
|
||||||
|
|
||||||
return filter
|
return filter
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user