Merge branch 'feat/pagination' of github.com:makeplane/plane into feat/pagination

This commit is contained in:
rahulramesha 2024-03-22 13:58:54 +05:30
commit 3bacdd6dd4

View File

@ -1,6 +1,7 @@
import re import re
import uuid import uuid
from datetime import timedelta from datetime import timedelta
from django.utils import timezone from django.utils import timezone
# The date from pattern # The date from pattern
@ -63,6 +64,7 @@ def date_filter(filter, date_term, queries):
""" """
for query in queries: for query in queries:
date_query = query.split(";") date_query = query.split(";")
if date_query:
if len(date_query) >= 2: if len(date_query) >= 2:
match = pattern.match(date_query[0]) match = pattern.match(date_query[0])
if match: if match:
@ -81,6 +83,8 @@ def date_filter(filter, date_term, queries):
filter[f"{date_term}__gte"] = date_query[0] filter[f"{date_term}__gte"] = date_query[0]
else: else:
filter[f"{date_term}__lte"] = date_query[0] filter[f"{date_term}__lte"] = date_query[0]
else:
filter[f"{date_term}__contains"] = date_query[0]
def filter_state(params, filter, method): def filter_state(params, filter, method):