Manage rejected user warning promise

If the user select the option No, the promise is rejected so we must reject
the rpc call.

issue8645
review274071002
This commit is contained in:
Cédric Krier committed 2019-10-24 19:10:36 +02:00
1 parent 820b478002
commit 6d40fedc21
1 file changed
+2 -2
+2 -2
View File
@@ -42,7 +42,7 @@
msg = data.error[1][1];
description = data.error[1][2];
Sao.common.userwarning.run(msg, description)
.done(function(result) {
.then(function(result) {
if (!~['always', 'ok'].indexOf(result)) {
dfd.reject();
return;
@@ -58,7 +58,7 @@
Sao.rpc(args, session).then(
dfd.resolve, dfd.reject);
});
});
}, dfd.reject);
return;
} else if (data.error[0] == 'UserError') {
msg = data.error[1][0];