diff --git a/addons/web_editor/controllers/main.py b/addons/web_editor/controllers/main.py index f175d949c97..232c35bc8a6 100644 --- a/addons/web_editor/controllers/main.py +++ b/addons/web_editor/controllers/main.py @@ -195,7 +195,7 @@ class Web_Editor(http.Controller): @http.route('/web_editor/stars', type='json', auth='user') def update_stars(self, res_model, res_id, filename, starsId, rating): record = request.env[res_model].browse(res_id) - value = getattr(record, filename, False) + value = filename in record._fields and record[filename] htmlelem = etree.fromstring("
%s
" % value, etree.HTMLParser()) stars_widget = htmlelem.find(".//span[@id='checkId-%s']" % starsId)