🐛 fix: corrects placement of cancellation type assignment
This commit is contained in:
parent
c3b1d42cef
commit
3fa2763ebf
|
|
@ -160,7 +160,6 @@ def clear(target_calendars: list, is_test: bool=False) -> dict:
|
||||||
"is_recurring": event.is_recurring,
|
"is_recurring": event.is_recurring,
|
||||||
"is_prioritized": event.is_prioritized,
|
"is_prioritized": event.is_prioritized,
|
||||||
"is_deprioritized": is_deprioritized,
|
"is_deprioritized": is_deprioritized,
|
||||||
"cancellation_type": "deleted" if is_deleted else "cancelled",
|
|
||||||
},
|
},
|
||||||
"overlaps_with": [{
|
"overlaps_with": [{
|
||||||
"uid": ov.uid,
|
"uid": ov.uid,
|
||||||
|
|
@ -181,6 +180,7 @@ def clear(target_calendars: list, is_test: bool=False) -> dict:
|
||||||
if not is_test:
|
if not is_test:
|
||||||
event.obj.delete()
|
event.obj.delete()
|
||||||
is_deleted = True
|
is_deleted = True
|
||||||
|
result["cancellation_type"] = "deleted"
|
||||||
results["deleted_overlapping_events"].append(result)
|
results["deleted_overlapping_events"].append(result)
|
||||||
print("Deleted overlapping event:")
|
print("Deleted overlapping event:")
|
||||||
|
|
||||||
|
|
@ -190,6 +190,7 @@ def clear(target_calendars: list, is_test: bool=False) -> dict:
|
||||||
if not is_test:
|
if not is_test:
|
||||||
event.obj.decline_invite()
|
event.obj.decline_invite()
|
||||||
is_cancelled = True
|
is_cancelled = True
|
||||||
|
result["cancellation_type"] = "cancelled"
|
||||||
results["cancelled_overlapping_recurring_events"].append(result)
|
results["cancelled_overlapping_recurring_events"].append(result)
|
||||||
print("Cancelled overlapping recurring event:")
|
print("Cancelled overlapping recurring event:")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue