Merge pull request #1919 from emanuelschuetze/fix1904
Fixed TypeError caused by #1904.
This commit is contained in:
commit
da30be5184
@ -149,13 +149,15 @@ angular.module('OpenSlidesApp.core', [
|
|||||||
function (DS) {
|
function (DS) {
|
||||||
return function (collection, instance) {
|
return function (collection, instance) {
|
||||||
var Resource = DS.definitions[collection];
|
var Resource = DS.definitions[collection];
|
||||||
Resource.relationList.forEach(function (relationDef) {
|
if (Resource.relationList) {
|
||||||
if (relationDef.foreignKey) {
|
Resource.relationList.forEach(function (relationDef) {
|
||||||
var query = {};
|
if (relationDef.foreignKey) {
|
||||||
query[relationDef.foreignKey] = instance[Resource.idAttribute];
|
var query = {};
|
||||||
Resource.getResource(relationDef.relation).ejectAll(query);
|
query[relationDef.foreignKey] = instance[Resource.idAttribute];
|
||||||
}
|
Resource.getResource(relationDef.relation).ejectAll(query);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
Loading…
Reference in New Issue
Block a user