[FIX] base_import: error message

During the import of a file, if the connection is closed (timeout,
server shutdown...), a traceback appears.

This is because `error.data.arguments` is not defined in this case.

opw-682104
This commit is contained in:
Nicolas Martinelli
2016-08-17 11:43:17 +02:00
parent 907f9554d4
commit 717ca3390f
+1 -1
View File
@@ -411,7 +411,7 @@ var DataImport = Widget.extend(ControlPanelMixin, {
return $.when([{
type: 'error',
record: false,
message: error.data.arguments[1],
message: error.data.arguments && error.data.arguments[1] || error.message,
}]);
}) ;
},