mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
fix: start date and end date comparassion fix in cycle create and update (#6333)
This commit is contained in:
@@ -32,7 +32,9 @@ class CycleSerializer(BaseSerializer):
|
||||
):
|
||||
project_id = self.initial_data.get("project_id") or self.instance.project_id
|
||||
is_start_date_end_date_equal = (
|
||||
True if data.get("start_date") == data.get("end_date") else False
|
||||
True
|
||||
if str(data.get("start_date")) == str(data.get("end_date"))
|
||||
else False
|
||||
)
|
||||
data["start_date"] = convert_to_utc(
|
||||
date=str(data.get("start_date").date()),
|
||||
|
||||
@@ -22,7 +22,9 @@ class CycleWriteSerializer(BaseSerializer):
|
||||
):
|
||||
project_id = self.initial_data.get("project_id") or self.instance.project_id
|
||||
is_start_date_end_date_equal = (
|
||||
True if data.get("start_date") == data.get("end_date") else False
|
||||
True
|
||||
if str(data.get("start_date")) == str(data.get("end_date"))
|
||||
else False
|
||||
)
|
||||
data["start_date"] = convert_to_utc(
|
||||
date=str(data.get("start_date").date()),
|
||||
|
||||
@@ -535,7 +535,7 @@ class CycleDateCheckEndpoint(BaseAPIView):
|
||||
)
|
||||
|
||||
is_start_date_end_date_equal = (
|
||||
True if str("start_date") == str("end_date") else False
|
||||
True if str(start_date) == str(end_date) else False
|
||||
)
|
||||
start_date = convert_to_utc(
|
||||
date=str(start_date), project_id=project_id, is_start_date=True
|
||||
|
||||
Reference in New Issue
Block a user