projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4362c61
)
[FIX] correctly handle invalid max_width/max_height passed to website._image
author
Xavier Morel
<xmo@openerp.com>
Fri, 23 May 2014 13:11:13 +0000
(15:11 +0200)
committer
Xavier Morel
<xmo@openerp.com>
Fri, 23 May 2014 13:11:13 +0000
(15:11 +0200)
addons/website/models/website.py
patch
|
blob
|
history
diff --git
a/addons/website/models/website.py
b/addons/website/models/website.py
index
e0aac6d
..
9828e9a
100644
(file)
--- a/
addons/website/models/website.py
+++ b/
addons/website/models/website.py
@@
-555,8
+555,10
@@
class website(osv.osv):
if record.get(presized):
response.data = data
return response
-
- fit = int(max_width), int(max_height)
+ try:
+ fit = int(max_width), int(max_height)
+ except TypeError:
+ fit = (maxint, maxint)
w, h = image.size
max_w, max_h = fit