From 9e7a33f7df7a801858013519fb9c770a1980b917 Mon Sep 17 00:00:00 2001
From: Jeremy Kersten <jke@odoo.com>
Date: Tue, 3 Oct 2017 22:09:51 +0200
Subject: [PATCH] [FIX] calendar: read of an unknown id crash

Support now that the read can receive id from calendar.event that
doesn't exists. And just ignore the inexisting ids.
---
 addons/calendar/models/calendar.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/addons/calendar/models/calendar.py b/addons/calendar/models/calendar.py
index 01ad86558dc7..8becd2b9fccb 100644
--- a/addons/calendar/models/calendar.py
+++ b/addons/calendar/models/calendar.py
@@ -1543,6 +1543,8 @@ class Meeting(models.Model):
 
         result = []
         for calendar_id, real_id in select:
+            if not real_data.get(real_id):
+                continue
             res = real_data[real_id].copy()
             ls = calendar_id2real_id(calendar_id, with_date=res and res.get('duration', 0) > 0 and res.get('duration') or 1)
             if not isinstance(ls, (pycompat.string_types, pycompat.integer_types)) and len(ls) >= 2:
-- 
GitLab