[FIX] web_editor: avoid error popup when saving incomplete link dialog
Before this commit saving an incomplete link dialog triggered the display of a stacktrace error popup. After this commit saving is cancelled when an attempt at saving an incomplete link dialog is done. The incorrect fields already did display their error status. task-2675252 closes odoo/odoo#80043 X-original-commit: 47f0596233c2d8a09d91cdfae117aa3f595bb6bf Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -197,6 +197,10 @@ const LinkDialog = Dialog.extend({
|
||||
*/
|
||||
save: function () {
|
||||
this.linkWidget.save();
|
||||
if (!this.linkWidget.final_data) {
|
||||
// Invalid form content: do not proceed with save.
|
||||
return;
|
||||
}
|
||||
this.final_data = this.linkWidget.final_data;
|
||||
return this._super(...arguments);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user