[FIX] website_mail: do not propagate csrf_token to message_post method
Indeed through portal users can post a message. Form used in order to do so include a csrf token. However this one should not be propagated to message_post because it is not a mail_message model field. This creates unnecessary warnings. Closes #13956 .
This commit is contained in:
committed by
Thibault Delavallée
parent
b21426ab9c
commit
a0ff74b78d
@@ -65,6 +65,7 @@ def _message_post_helper(res_model='', res_id=None, message='', token='', token_
|
||||
res = res.sudo()
|
||||
else:
|
||||
raise NotFound()
|
||||
kw.pop('csrf_token', None)
|
||||
return res.with_context({'mail_create_nosubscribe': nosubscribe}).message_post(body=message,
|
||||
message_type=kw.pop('message_type', False) or "comment",
|
||||
subtype=kw.pop('subtype', False) or "mt_comment",
|
||||
|
||||
Reference in New Issue
Block a user