summaryrefslogtreecommitdiff
path: root/addons/web_editor/controllers
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-03-20 11:45:11 +0100
committerChristophe Simonis <chs@odoo.com>2018-03-20 11:45:11 +0100
commite0345a4a3f4cfa8f4de8723c6b72b741b06483a1 (patch)
tree5ad51dbebfd89cd7e56bf12df2da3ecf4d8e9509 /addons/web_editor/controllers
parente9db6b6d9de1e0589e8871ca2e5e8dde8ec8cab7 (diff)
parent2835d299792ffa925d86ad3460057be713ac4fac (diff)
[MERGE] forward port branch 11.0 up to 2835d299792
Diffstat (limited to 'addons/web_editor/controllers')
-rw-r--r--addons/web_editor/controllers/main.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web_editor/controllers/main.py b/addons/web_editor/controllers/main.py
index b14c58ae938..68051f8c07c 100644
--- a/addons/web_editor/controllers/main.py
+++ b/addons/web_editor/controllers/main.py
@@ -147,7 +147,10 @@ class Web_Editor(http.Controller):
Attachments = request.env['ir.attachment'] # registry for the attachment table
res_model = kwargs.get('res_model', 'ir.ui.view')
- res_id = res_model != 'ir.ui.view' and kwargs.get('res_id') or None
+ if res_model != 'ir.ui.view' and kwargs.get('res_id'):
+ res_id = int(kwargs['res_id'])
+ else:
+ res_id = None
uploads = []
message = None