diff options
| author | qsm-odoo <qsm@odoo.com> | 2020-06-05 15:16:03 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-06-05 15:41:10 +0000 |
| commit | 6e2ec9c7d4dcf5dc3ee3619fe1252f0f5ba1e606 (patch) | |
| tree | dc4e14f11dafb9b19f1e089d0984e144f68686e1 /addons/web_editor/static | |
| parent | 94bb547afebf948e58bda8f6916aa7368ede74f2 (diff) | |
[FIX] web_editor: ensure a crash during save does not lock the editor
An error has been introduced by [1]. Indeed `response.data` does not
exist, but `response.message.data` does. However, the whole `if` clause
there seems now useless so this commit removes it. The whole file is
being refactored anyway with the new editor.
[1]: https://github.com/odoo/odoo/commit/ab4000fb3cf8fa54ba714ceceec391b78d73755e#diff-b1b550326b2d36a24e94e52c3901d1fbL513
closes odoo/odoo#52534
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/web_editor/static')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/rte.js | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/addons/web_editor/static/src/js/editor/rte.js b/addons/web_editor/static/src/js/editor/rte.js index 9abfc6b3a70..bf5c0db613d 100644 --- a/addons/web_editor/static/src/js/editor/rte.js +++ b/addons/web_editor/static/src/js/editor/rte.js @@ -510,18 +510,11 @@ var RTEWidget = Widget.extend({ // new rejection with all relevant info var id = _.uniqueId('carlos_danger_'); $el.addClass('o_dirty oe_carlos_danger ' + id); - var html = Boolean(response.data.name); - if (html) { - var msg = $('<div/>', {text: response.message.data.message}).html(); - var data = msg.substring(3, msg.length -2).split(/', u'/); - response.message.data.message = '<b>' + data[0] + '</b>' + data[1]; - } $('.o_editable.' + id) .removeClass(id) .popover({ - html: html, trigger: 'hover', - content: response.message.data.message, + content: response.message.data.message || '', placement: 'auto top', }) .popover('show'); |
