[FIX] microsoft_calendar: sync events without body property
Before this commit: if a Microsoft event didn't have body property, it couldn't get synced with Odoo and raised an error. The solution is first to check if it contains the body and then gets its content value. opw-2765443 closes odoo/odoo#89634 X-original-commit: 13d57ff5e714bee96fb930c1b8050816bf22c268 Signed-off-by: Arnaud Joset <arj@odoo.com> Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
This commit is contained in:
@@ -106,7 +106,7 @@ class Meeting(models.Model):
|
||||
values = {
|
||||
**default_values,
|
||||
'name': microsoft_event.subject or _("(No title)"),
|
||||
'description': microsoft_event.body['content'],
|
||||
'description': microsoft_event.body and microsoft_event.body['content'],
|
||||
'location': microsoft_event.location and microsoft_event.location.get('displayName') or False,
|
||||
'user_id': microsoft_event.owner(self.env).id,
|
||||
'privacy': sensitivity_o2m.get(microsoft_event.sensitivity, self.default_get(['privacy'])['privacy']),
|
||||
|
||||
Reference in New Issue
Block a user