Skip to content
Snippets Groups Projects
Commit 327dda0b authored by Xavier Morel's avatar Xavier Morel
Browse files

[FIX] correctly handle invalid max_width/max_height passed to website._image

parent 4362c612
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment