From 3fa2763ebf73270f07928ba25eb942ba7289750f Mon Sep 17 00:00:00 2001 From: Marc Koch Date: Mon, 14 Jul 2025 16:40:32 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20corrects=20placement=20of?= =?UTF-8?q?=20cancellation=20type=20assignment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/clear_bookings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/clear_bookings.py b/src/clear_bookings.py index 8fa07ac..2e467e5 100644 --- a/src/clear_bookings.py +++ b/src/clear_bookings.py @@ -160,7 +160,6 @@ def clear(target_calendars: list, is_test: bool=False) -> dict: "is_recurring": event.is_recurring, "is_prioritized": event.is_prioritized, "is_deprioritized": is_deprioritized, - "cancellation_type": "deleted" if is_deleted else "cancelled", }, "overlaps_with": [{ "uid": ov.uid, @@ -181,6 +180,7 @@ def clear(target_calendars: list, is_test: bool=False) -> dict: if not is_test: event.obj.delete() is_deleted = True + result["cancellation_type"] = "deleted" results["deleted_overlapping_events"].append(result) print("Deleted overlapping event:") @@ -190,6 +190,7 @@ def clear(target_calendars: list, is_test: bool=False) -> dict: if not is_test: event.obj.decline_invite() is_cancelled = True + result["cancellation_type"] = "cancelled" results["cancelled_overlapping_recurring_events"].append(result) print("Cancelled overlapping recurring event:")