[FIX] website_forum: avoid traceback on ack notif
Before this commit, notification_read raise a traceback on some button click. Eg: Flag/unglaG It was hidden in the console, but we can just avoid it too closes odoo/odoo#30524
This commit is contained in:
@@ -100,7 +100,8 @@ class WebsiteForum(http.Controller):
|
||||
|
||||
@http.route('/forum/notification_read', type='json', auth="user", methods=['POST'], website=True)
|
||||
def notification_read(self, **kwargs):
|
||||
request.env['mail.message'].browse([int(kwargs.get('notification_id'))]).set_message_done()
|
||||
if kwargs.get('notification_id'):
|
||||
request.env['mail.message'].browse([int(kwargs.get('notification_id'))]).set_message_done()
|
||||
return True
|
||||
|
||||
def sitemap_forum(env, rule, qs):
|
||||
|
||||
Reference in New Issue
Block a user