From 8588649c127ecc01455a01c31583bc97dfddefde Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 31 Oct 2019 09:29:50 +0000 Subject: [PATCH] [FIX] website_forum: Empty question error Steps to reproduce the bug: - Ask a question in the forum with a title but with no content Bug: A traceback was raised. opw:2093665 closes odoo/odoo#39675 X-original-commit: 51f660c9a66f2e6aecb51e476d815b2f083f843d Signed-off-by: Simon Goffin (sig) --- addons/website_forum/controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py index fd44edb48a5..d0f47befb7b 100644 --- a/addons/website_forum/controllers/main.py +++ b/addons/website_forum/controllers/main.py @@ -301,7 +301,7 @@ class WebsiteForum(WebsiteProfile): type='http', auth="user", methods=['POST'], website=True) def post_create(self, forum, post_parent=None, **post): if post.get('content', '') == '


': - return request.render('website.http_error', { + return request.render('http_routing.http_error', { 'status_code': _('Bad Request'), 'status_message': post_parent and _('Reply should not be empty.') or _('Question should not be empty.') }) @@ -370,7 +370,7 @@ class WebsiteForum(WebsiteProfile): @http.route('/forum//post//save', type='http', auth="user", methods=['POST'], website=True) def post_save(self, forum, post, **kwargs): if 'post_name' in kwargs and not kwargs.get('post_name').strip(): - return request.render('website.http_error', { + return request.render('http_routing.http_error', { 'status_code': _('Bad Request'), 'status_message': _('Title should not be empty.') })