summaryrefslogtreecommitdiff
path: root/addons/portal/controllers
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-07-29 14:10:30 +0200
committerChristophe Simonis <chs@odoo.com>2019-07-29 14:10:30 +0200
commitd5e1fd16b4fd796cc25b2b2d694dadb375110ce7 (patch)
tree35d130b4161985cd9ca3071a59980b52e8401be5 /addons/portal/controllers
parentae71f95371b4a5c99c10a23e3553c5badc45a1ac (diff)
parentcda4f3c308ca233aead81f5ae97d250b5b7bf82f (diff)
[MERGE] forward port branch saas-12.4 up to cda4f3c308c
Diffstat (limited to 'addons/portal/controllers')
-rw-r--r--addons/portal/controllers/mail.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/addons/portal/controllers/mail.py b/addons/portal/controllers/mail.py
index c694caec6df..dec8fccff5c 100644
--- a/addons/portal/controllers/mail.py
+++ b/addons/portal/controllers/mail.py
@@ -76,7 +76,7 @@ def _message_post_helper(res_model, res_id, message, token='', nosubscribe=True,
raise NotFound()
# Signed Token Case: author_id is forced
elif kw.get('hash') and kw.get('pid'):
- author_id = kw.get('pid')
+ author_id = int(kw.get('pid'))
kw.pop('csrf_token', None)
kw.pop('redirect', None)
@@ -85,12 +85,8 @@ def _message_post_helper(res_model, res_id, message, token='', nosubscribe=True,
kw.pop('hash', None)
kw.pop('pid', None)
return record.with_context(mail_create_nosubscribe=nosubscribe).message_post(
- body=message,
- message_type=kw.pop('message_type', "comment"),
- subtype=kw.pop('subtype', "mt_comment"),
- author_id=author_id,
- **kw
- )
+ body=message, message_type=kw.pop('message_type', "comment"),
+ subtype=kw.pop('subtype', "mt_comment"), author_id=author_id, **kw)
class PortalChatter(http.Controller):