[FIX] rating: Typo error
When record.id was not in the dictionary result, it raised a error. opw:709072
This commit is contained in:
@@ -65,7 +65,7 @@ class RatingMixin(models.AbstractModel):
|
||||
for data in read_group_res:
|
||||
result[data['res_id']] += data['res_id_count']
|
||||
for record in self:
|
||||
record.rating_count = result[record.id]
|
||||
record.rating_count = result.get(record.id)
|
||||
|
||||
def rating_get_partner_id(self):
|
||||
if hasattr(self, 'partner_id') and self.partner_id:
|
||||
|
||||
Reference in New Issue
Block a user