diff options
| author | Xavier Morel <xmo@odoo.com> | 2018-10-02 15:55:34 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@odoo.com> | 2018-10-03 16:54:25 +0200 |
| commit | 376361c15c8d2be15a2579ffd0432f31d745deb8 (patch) | |
| tree | 24f41a79ae1b68fb741046401fee67d4c7c1d2b6 /addons/base_import/static/src | |
| parent | 5141f42d0e734220a817e1b129e2de5531dc9442 (diff) | |
[FIX] base_import: show error message in some situation where it was missing
On an AccessError, the relevant message is passed as the first arg. But
the import error handler would only check for the second arg (if any)
then fallback on error.message, which is missing entirely when the issue
is raised as an except_orm subclass.
Diffstat (limited to 'addons/base_import/static/src')
| -rw-r--r-- | addons/base_import/static/src/js/import_action.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/base_import/static/src/js/import_action.js b/addons/base_import/static/src/js/import_action.js index 6a17e25cb5b..c093987bc8e 100644 --- a/addons/base_import/static/src/js/import_action.js +++ b/addons/base_import/static/src/js/import_action.js @@ -582,7 +582,8 @@ var DataImport = AbstractAction.extend(ControlPanelMixin, { msg = _t("An unknown issue occurred during import (possibly lost connection, data limit exceeded or memory limits exceeded). Please retry in case the issue is transient. If the issue still occurs, try to split the file rather than import it at once."); } } else { - msg = error.data.arguments ? error.data.arguments[1] : error.message; + msg = (error.data.arguments && error.data.arguments[1] || error.data.arguments[0]) + || error.message; } return $.when({'messages': [{ |
