From 31624f3ae61ad90e50491cea089b8cc962d7f6da Mon Sep 17 00:00:00 2001 From: pablohashescobar <118773738+pablohashescobar@users.noreply.github.com> Date: Sat, 25 Mar 2023 11:14:16 +0530 Subject: [PATCH] fix: start date and target date issue filter (#525) --- apiserver/plane/utils/issue_filters.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apiserver/plane/utils/issue_filters.py b/apiserver/plane/utils/issue_filters.py index 8ed47e210..f4af1fafd 100644 --- a/apiserver/plane/utils/issue_filters.py +++ b/apiserver/plane/utils/issue_filters.py @@ -121,16 +121,16 @@ def filter_start_date(params, filter, method): for query in start_dates: start_date_query = query.split(";") if len(start_date_query) == 2 and "after" in start_date_query: - filter["start_date__date__gte"] = start_date_query[0] + filter["start_date__gte"] = start_date_query[0] else: - filter["start_date__date__lte"] = start_date_query[0] + filter["start_date__lte"] = start_date_query[0] else: if params.get("start_date", None) and len(params.get("start_date")): for query in params.get("start_date"): if query.get("timeline", "after") == "after": - filter["start_date__date__gte"] = query.get("datetime") + filter["start_date__gte"] = query.get("datetime") else: - filter["start_date__date__lte"] = query.get("datetime") + filter["start_date__lte"] = query.get("datetime") return filter @@ -141,16 +141,16 @@ def filter_target_date(params, filter, method): for query in target_dates: target_date_query = query.split(";") if len(target_date_query) == 2 and "after" in target_date_query: - filter["target_date__date__gte"] = target_date_query[0] + filter["target_date__gte"] = target_date_query[0] else: - filter["target_date__date__lte"] = target_date_query[0] + filter["target_date__lte"] = target_date_query[0] else: if params.get("target_date", None) and len(params.get("target_date")): for query in params.get("target_date"): if query.get("timeline", "after") == "after": - filter["target_date__date__gte"] = query.get("datetime") + filter["target_date__gte"] = query.get("datetime") else: - filter["target_date__date__lte"] = query.get("datetime") + filter["target_date__lte"] = query.get("datetime") return filter