Files
odoo_source/addons/web_editor
xO-Tx 47806eb87f [FIX] web_editor: fix empty media dialog save issue
when media dialog launched for the first time (with no selected
media attachment), "FileWidget.selectedAttachments" contains a default
object {url:... , alt:...} (default attachment already on the target),
and the click on "Add" button will cause a backtrace since the code on
"_save" method tries to access "image_src" attribute on all selectedAttachments
elements including default one.

The simplest solution would be to check if the object already has
an "image_src" attribute.

task-2312878

closes odoo/odoo#59351

X-original-commit: ecffbe4060eea98d3444f308bcd28bfb9287e1c3
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-07 08:52:41 +00:00
..
2020-10-05 09:36:34 +00:00