Only specify activating_user field if one is actually needed

This commit is contained in:
Joseph Schorr 2014-03-17 15:04:12 -04:00
parent 05261c8455
commit d0d8ce9057

View file

@ -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;