Only specify activating_user field if one is actually needed
This commit is contained in:
parent
05261c8455
commit
d0d8ce9057
1 changed files with 4 additions and 1 deletions
|
@ -1795,11 +1795,14 @@ quayApp.directive('prototypeManager', function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
'activating_user': $scope.newForWholeOrg ? null : $scope.activatingForNew,
|
|
||||||
'delegate': $scope.delegateForNew,
|
'delegate': $scope.delegateForNew,
|
||||||
'role': $scope.newRole
|
'role': $scope.newRole
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!$scope.newForWholeOrg) {
|
||||||
|
data['activating_user'] = $scope.activatingForNew;
|
||||||
|
}
|
||||||
|
|
||||||
ApiService.createOrganizationPrototypePermission(data, params).then(function(resp) {
|
ApiService.createOrganizationPrototypePermission(data, params).then(function(resp) {
|
||||||
$scope.prototypes.push(resp);
|
$scope.prototypes.push(resp);
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
|
|
Reference in a new issue