[FIX] website_slides: fix crashes on channel creation/edit

SPECIFICATIONS

Before this commit, creating a channel would crash because of NewID key
not existing in a dictionary for compute fields. A crash would also happen
when deleting a slide from the channel form view.

LINKS

Task 1978731
PR #33255
This commit is contained in:
qmo-odoo
2019-08-08 08:26:08 +00:00
committed by Thibault Delavallée
parent f5ddd6f151
commit b37243b85f
@@ -227,7 +227,7 @@ class Channel(models.Model):
result[cid].update(cdata)
for record in self:
record.update(result[record.id])
record.update(result.get(record.id, {}))
def _compute_slides_statistics_type(self, read_group_res):
""" Compute statistics based on all existing slide types """