Skip to content

Commit

Permalink
[FIX] microsoft_calendar: traceback restarting synchronizations
Browse files Browse the repository at this point in the history
Before this commit, when restarting a synchronization with Outlook or Google, a traceback error could be thrown due when accessing a variable possibly null. After this commit, the variable integrity is checked before its access.

Issue from: 3473180

closes odoo#133991

Signed-off-by: Arnaud Joset (arj) <[email protected]>
  • Loading branch information
geflx committed Sep 1, 2023
1 parent 0c79e0c commit 2d9f0f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/microsoft_calendar/models/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def write(self, values):
# Forbid recurrence updates through Odoo and suggest user to update it in Outlook.
if self._check_microsoft_sync_status():
recurrency_in_batch = self.filtered(lambda ev: ev.recurrency)
recurrence_update_attempt = recurrence_update_setting or 'recurrency' in values or len(recurrency_in_batch) > 0
recurrence_update_attempt = recurrence_update_setting or 'recurrency' in values or recurrency_in_batch and len(recurrency_in_batch) > 0
if not notify_context and recurrence_update_attempt and not 'active' in values:
self._forbid_recurrence_update()

Expand Down

0 comments on commit 2d9f0f2

Please sign in to comment.