Do not expect promise from Record.set
Since issue8482, Record.set does not return a promise anymore. issue8585 review264081002
This commit is contained in:
1 parent
79f1ce16fc
commit
68462c0576
2 files changed
+6
-11
No files matched your search
+1
-3
@@ -702,7 +702,6 @@
|
||||
var succeed = function(values, exception) {
|
||||
if (exception === undefined) exception = false;
|
||||
var id2value = {};
|
||||
var promises = [];
|
||||
values.forEach(function(e, i, a) {
|
||||
id2value[e.id] = e;
|
||||
});
|
||||
@@ -722,10 +721,9 @@
|
||||
}
|
||||
delete value[key];
|
||||
}
|
||||
promises.push(record.set(value));
|
||||
record.set(value);
|
||||
}
|
||||
}
|
||||
return jQuery.when.apply(jQuery, promises);
|
||||
}.bind(this);
|
||||
var failed = function() {
|
||||
var failed_values = [];
|
||||
|
||||
+5
-8
@@ -734,17 +734,14 @@
|
||||
}.bind(this));
|
||||
};
|
||||
var set_preferences = function(preferences) {
|
||||
var prm;
|
||||
this.screen.current_record.cancel();
|
||||
prm = this.screen.current_record.set(preferences);
|
||||
this.screen.current_record.set(preferences);
|
||||
this.screen.current_record.id =
|
||||
this.screen.model.session.user_id;
|
||||
prm.then(function() {
|
||||
this.screen.current_record.validate(null, true).then(
|
||||
function() {
|
||||
this.screen.display(true);
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
this.screen.current_record.validate(null, true).then(
|
||||
function() {
|
||||
this.screen.display(true);
|
||||
}.bind(this));
|
||||
dialog.body.append(this.screen.screen_container.el);
|
||||
this.el.modal('show');
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user