[FIX] web: invalid image placeholder resizing
Access `/web/image/82303?height=16`, traceback because the placeholder image cannot be resized to `"16"`. closes odoo/odoo#92891 Signed-off-by: Julien Castiaux <juc@odoo.com>
This commit is contained in:
committed by
Julien Castiaux
parent
c5f0e89bca
commit
fc115ebdf7
@@ -142,7 +142,7 @@ class Binary(http.Controller):
|
||||
width, height = image_guess_size_from_field_name(field)
|
||||
record = request.env.ref('web.image_placeholder').sudo()
|
||||
stream = request.env['ir.binary']._get_image_stream_from(
|
||||
record, 'raw', width=width, height=height, crop=crop,
|
||||
record, 'raw', width=int(width), height=int(height), crop=crop,
|
||||
)
|
||||
|
||||
send_file_kwargs = {'as_attachment': download}
|
||||
|
||||
Reference in New Issue
Block a user