[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:
Julien Castiaux
2022-06-03 18:34:49 +02:00
committed by Julien Castiaux
parent c5f0e89bca
commit fc115ebdf7
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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}