diff options
| author | Goffin Simon <sig@odoo.com> | 2017-10-12 16:13:42 +0200 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2017-10-16 09:53:11 +0200 |
| commit | cd21942ab8473718a5f986f12a5d76d7f71b2909 (patch) | |
| tree | 41f6ff7a99d2e51218a0cecd43751b3dc228cc9b /addons/website_forum/controllers | |
| parent | 945dd32eb02f91ae2e5d0ab6545704bd19e7f05a (diff) | |
[FIX] website_forum: 404 error message for empty question
When a empty question was posted in the forum, a 404 error was raised.
opw:76940
Diffstat (limited to 'addons/website_forum/controllers')
| -rw-r--r-- | addons/website_forum/controllers/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py index fb21827b0fe..8ec59225e6b 100644 --- a/addons/website_forum/controllers/main.py +++ b/addons/website_forum/controllers/main.py @@ -322,7 +322,7 @@ class WebsiteForum(http.Controller): if post_type == 'question' and not post.get('post_name', ''): return request.render('website.http_error', {'status_code': _('Bad Request'), 'status_message': _('Title should not be empty.')}) if post.get('content', '') == '<p><br></p>': - return werkzeug.utils.redirect("/forum/%s/question/%s?nocontent=1" % (slug(forum), post_parent and slug(post_parent))) + return request.render('website.http_error', {'status_code': _('Bad Request'), 'status_message': _('Question should not be empty.')}) post_tag_ids = forum._tag_to_write_vals(post.get('post_tags', '')) |
