summaryrefslogtreecommitdiff
path: root/addons/web
diff options
context:
space:
mode:
authorJeremy Kersten <jke@odoo.com>2017-07-28 10:29:00 +0200
committerJeremy Kersten <jke@odoo.com>2017-07-28 18:30:01 +0200
commitf3f66d2b8e4991f2ecfdf2242ef5c7adddda6557 (patch)
tree8977eff80e767e9dd7f5fac5e3c25b1f52ccf6f9 /addons/web
parente6863851382c16229d7e7f09179b445308a57503 (diff)
[FIX] web: avoid cast None in int
Some function send None instead of 0
Diffstat (limited to 'addons/web')
-rw-r--r--addons/web/controllers/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index d18f14d9b3f..e14f72cf682 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -999,8 +999,8 @@ class Binary(http.Controller):
elif status != 200 and download:
return request.not_found()
- height = int(height)
- width = int(width)
+ height = int(height or 0)
+ width = int(width or 0)
if content and (width or height):
# resize maximum 500*500
if width > 500: