From e103ec9152f0945deab760bf944c9d8a11975389 Mon Sep 17 00:00:00 2001 From: Matias Bordese Date: Thu, 3 Nov 2022 11:21:42 -0300 Subject: [PATCH] Fix all-day end as datetime value Co-authored-by: Vadim Stepanov --- engine/apps/schedules/models/on_call_schedule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/apps/schedules/models/on_call_schedule.py b/engine/apps/schedules/models/on_call_schedule.py index e2287ecd..bd79c190 100644 --- a/engine/apps/schedules/models/on_call_schedule.py +++ b/engine/apps/schedules/models/on_call_schedule.py @@ -227,7 +227,7 @@ class OnCallSchedule(PolymorphicModel): end = shift["end"] - timezone.timedelta(days=1) if all_day else shift["end"] if all_day and all_day_datetime: start = datetime.datetime.combine(start, datetime.datetime.min.time(), tzinfo=pytz.UTC) - end = datetime.datetime.combine(start, datetime.datetime.max.time(), tzinfo=pytz.UTC) + end = datetime.datetime.combine(end, datetime.datetime.max.time(), tzinfo=pytz.UTC) is_gap = shift.get("is_gap", False) shift_json = { "all_day": all_day,