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];
|
var Resource = DS.definitions[collection];
|
||||||
if (Resource.relationList) {
|
if (Resource.relationList) {
|
||||||
Resource.relationList.forEach(function (relationDef) {
|
Resource.relationList.forEach(function (relationDef) {
|
||||||
if (relationDef.foreignKey) {
|
if (relationDef.foreignKey && !relationDef.osProtectedRelation) {
|
||||||
var query = {};
|
var query = {};
|
||||||
query[relationDef.foreignKey] = instance[Resource.idAttribute];
|
query[relationDef.foreignKey] = instance[Resource.idAttribute];
|
||||||
Resource.getResource(relationDef.relation).ejectAll(query);
|
Resource.getResource(relationDef.relation).ejectAll(query);
|
||||||
|
@ -36,6 +36,7 @@ angular.module('OpenSlidesApp.motions.motionBlock', [])
|
|||||||
'motions/motion': {
|
'motions/motion': {
|
||||||
localField: 'motions',
|
localField: 'motions',
|
||||||
foreignKey: 'motion_block_id',
|
foreignKey: 'motion_block_id',
|
||||||
|
osProtectedRelation: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user