Add missing assert on Model.delete_

This commit is contained in:
Cédric Krier committed 2015-03-27 16:00:20 +01:00
1 parent f52be78bf2
commit 717ef2594c
1 file changed
+6 -2
+6 -2
View File
@@ -48,8 +48,12 @@
}
var record = records[0];
var root_group = record.group.root_group();
// TODO test same model
// TODO test same root group
console.assert(records.every(function(r) {
return r.model.name == record.model.name;
}), 'records not from the same model');
console.assert(records.every(function(r) {
return r.group.root_group() == record.group.root_group();
}), 'records not from the same root group');
records = records.filter(function(record) {
return record.id >= 0;
});