fix: start date and end date comparassion fix in cycle create and update (#6333)
This commit is contained in:
parent
742559bc63
commit
6914dc9f42
3 changed files with 7 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue