[FIX] website: avoid using werkzeug API only present in 0.9+
bzr revid: odo@openerp.com-20140424131415-ot0r5062wndvuicr
This commit is contained in:
@@ -393,7 +393,7 @@ class Website(openerp.addons.web.controllers.main.Home):
|
||||
# record provides a pre-resized version of the base field, use that
|
||||
# directly
|
||||
if record.get(presized):
|
||||
response.set_data(data)
|
||||
response.data = data
|
||||
return response
|
||||
|
||||
fit = int(max_width), int(max_height)
|
||||
@@ -401,7 +401,7 @@ class Website(openerp.addons.web.controllers.main.Home):
|
||||
max_w, max_h = fit
|
||||
|
||||
if w < max_w and h < max_h:
|
||||
response.set_data(data)
|
||||
response.data = data
|
||||
else:
|
||||
image.thumbnail(fit, Image.ANTIALIAS)
|
||||
image.save(response.stream, image.format)
|
||||
|
||||
@@ -121,7 +121,7 @@ class ir_http(orm.AbstractModel):
|
||||
return response
|
||||
|
||||
response.mimetype = attach[0]['mimetype']
|
||||
response.set_data(datas.decode('base64'))
|
||||
response.data = datas.decode('base64')
|
||||
return response
|
||||
|
||||
def _handle_exception(self, exception=None, code=500):
|
||||
|
||||
Reference in New Issue
Block a user