Write edited values synchronously to avoid concurrency error
issue8501 review283741002
This commit is contained in:
1 parent
c984b94a98
commit
dd20fb2490
1 file changed
+3
-7
+3
-7
@@ -1135,7 +1135,6 @@ function eval_pyson(value){
|
||||
}.bind(this));
|
||||
},
|
||||
write: function(widget, dialog) {
|
||||
var promises = [];
|
||||
this.languages.forEach(function(lang) {
|
||||
var input = jQuery('[data-lang-id=' + lang.id + ']');
|
||||
if (!input.attr('readonly')) {
|
||||
@@ -1155,15 +1154,12 @@ function eval_pyson(value){
|
||||
'method': 'model.' + widget.model.name + '.write',
|
||||
'params': params
|
||||
};
|
||||
var prm = Sao.rpc(args, widget.model.session);
|
||||
promises.push(prm);
|
||||
Sao.rpc(args, widget.model.session, false);
|
||||
}
|
||||
}.bind(this));
|
||||
widget.record.cancel();
|
||||
widget.view.display();
|
||||
this.close(dialog);
|
||||
jQuery.when.apply(jQuery, promises).then(function() {
|
||||
widget.record.cancel();
|
||||
widget.view.display();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user