diff --git a/resource_booking/models/resource_booking.py b/resource_booking/models/resource_booking.py index 9c381be5..77fb74c2 100644 --- a/resource_booking/models/resource_booking.py +++ b/resource_booking/models/resource_booking.py @@ -417,8 +417,10 @@ def _sync_meeting(self): to_create.append(meeting_vals) else: to_delete |= one.meeting_id - to_delete.unlink() - _self.env["calendar.event"].create(to_create) + if to_delete: + to_delete.unlink() + if to_create: + _self.env["calendar.event"].create(to_create) @api.constrains("combination_id", "meeting_id", "type_id") def _check_scheduling(self):