diff options
| author | Goffin Simon <sig@odoo.com> | 2019-10-31 09:29:50 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-10-31 16:38:08 +0000 |
| commit | 8588649c127ecc01455a01c31583bc97dfddefde (patch) | |
| tree | 6c67a930abf410aab183360ab5367a205742ec08 /addons/website_forum/controllers | |
| parent | b9ad9f4991b45a86818b4231b0ca54420023c422 (diff) | |
[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) <sig@openerp.com>
Diffstat (limited to 'addons/website_forum/controllers')
| -rw-r--r-- | addons/website_forum/controllers/main.py | 4 |
1 files 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', '') == '<p><br></p>': - 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/<model("forum.forum"):forum>/post/<model("forum.post"):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.') }) |
