Merge pull request #1711 from ostcar/fix_assignment_autoupdate
Angular: Eject assignment related users before a assignment is updated
This commit is contained in:
commit
6dee05328d
@ -80,6 +80,9 @@ angular.module('OpenSlidesApp.assignments', [])
|
||||
foreignKey: 'assignment_id',
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeInject: function (resource, instance) {
|
||||
AssignmentRelatedUser.ejectAll({where: {assignment_id: {'==': instance.id}}});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -130,7 +130,10 @@ angular.module('OpenSlidesApp.core', [
|
||||
}
|
||||
])
|
||||
|
||||
.factory('jsDataModel', ['$http', 'Projector', function($http, Projector) {
|
||||
.factory('jsDataModel', [
|
||||
'$http',
|
||||
'Projector',
|
||||
function($http, Projector) {
|
||||
var BaseModel = function() {};
|
||||
BaseModel.prototype.project = function() {
|
||||
return $http.post(
|
||||
@ -152,7 +155,8 @@ angular.module('OpenSlidesApp.core', [
|
||||
return typeof _.findKey(projector.elements, predicate) === 'string';
|
||||
};
|
||||
return BaseModel;
|
||||
}])
|
||||
}
|
||||
])
|
||||
|
||||
.factory('Customslide', [
|
||||
'DS',
|
||||
|
Loading…
Reference in New Issue
Block a user