Merge pull request #2873 from normanjaeckel/MotionCommentProtection
Fixed bug in relation for motion comment. Fixed #2568.
This commit is contained in:
commit
befff17969
@ -230,7 +230,7 @@ angular.module('OpenSlidesApp.core', [
|
||||
var Resource = DS.definitions[collection];
|
||||
if (Resource.relationList) {
|
||||
Resource.relationList.forEach(function (relationDef) {
|
||||
if (relationDef.foreignKey) {
|
||||
if (relationDef.foreignKey && !relationDef.osProtectedRelation) {
|
||||
var query = {};
|
||||
query[relationDef.foreignKey] = instance[Resource.idAttribute];
|
||||
Resource.getResource(relationDef.relation).ejectAll(query);
|
||||
|
@ -36,6 +36,7 @@ angular.module('OpenSlidesApp.motions.motionBlock', [])
|
||||
'motions/motion': {
|
||||
localField: 'motions',
|
||||
foreignKey: 'motion_block_id',
|
||||
osProtectedRelation: true,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user