Skip to content
Snippets Groups Projects
Commit 6ed93f17 authored by Jérome Maes's avatar Jérome Maes
Browse files

[FIX] website_mail : prevent posting empty comment

parent 04400f8b
No related branches found
No related tags found
No related merge requests found
......@@ -166,5 +166,8 @@ class WebsiteMail(http.Controller):
@http.route(['/website_mail/post/post'], type='http', method=['POST'], auth='public', website=True)
def chatter_post(self, res_model='', res_id=None, message='', redirect=None, **kw):
res_id = int(res_id)
message = _message_post_helper(res_model, res_id, message, **kw)
return request.redirect(request.httprequest.referrer + "#message-%s" % (message.id,))
url = request.httprequest.referrer
if message:
message = _message_post_helper(res_model, res_id, message, **kw)
url = url + "#message-%s" % (message.id,)
return request.redirect(url)
......@@ -44,7 +44,6 @@ class WebsiteMailController(WebsiteMail):
'res_id': res_id,
'message_id': message_id,
})
print rating
except Exception:
pass
return response
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment