mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 15:36:04 -03:30
fixed organization rest call from happening
This commit is contained in:
@@ -227,34 +227,6 @@ export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $routeP
|
|||||||
|
|
||||||
$scope.PermissionAddAllowed = false;
|
$scope.PermissionAddAllowed = false;
|
||||||
|
|
||||||
// Retrieve each related set and any lookups
|
|
||||||
if ($scope.teamLoadedRemove) {
|
|
||||||
$scope.teamLoadedRemove();
|
|
||||||
}
|
|
||||||
$scope.teamLoadedRemove = $scope.$on('teamLoaded', function () {
|
|
||||||
CheckAccess({ scope: $scope });
|
|
||||||
if ($scope.organization_url) {
|
|
||||||
Rest.setUrl($scope.organization_url);
|
|
||||||
Rest.get()
|
|
||||||
.success(function (data) {
|
|
||||||
$scope.organization_name = data.name;
|
|
||||||
master.organization_name = data.name;
|
|
||||||
Wait('stop');
|
|
||||||
})
|
|
||||||
.error(function (data, status) {
|
|
||||||
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to retrieve organization: ' +
|
|
||||||
$scope.orgnization_url + '. GET status: ' + status });
|
|
||||||
});
|
|
||||||
for (var set in relatedSets) {
|
|
||||||
$scope.search(relatedSets[set].iterator);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$scope.organization_name = "";
|
|
||||||
master.organization_name = "";
|
|
||||||
Wait('stop');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Retrieve each related set and any lookups
|
// Retrieve each related set and any lookups
|
||||||
if ($scope.loadTeamRemove) {
|
if ($scope.loadTeamRemove) {
|
||||||
$scope.loadTeamRemove();
|
$scope.loadTeamRemove();
|
||||||
@@ -307,7 +279,8 @@ export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $routeP
|
|||||||
});
|
});
|
||||||
|
|
||||||
$scope.organization_url = data.related.organization;
|
$scope.organization_url = data.related.organization;
|
||||||
$scope.$emit('teamLoaded');
|
$scope.organization_name = data.summary_fields.organization.name;
|
||||||
|
master.organization_name = data.summary_fields.organization.name;
|
||||||
})
|
})
|
||||||
.error(function (data, status) {
|
.error(function (data, status) {
|
||||||
ProcessErrors($scope, data, status, form, { hdr: 'Error!', msg: 'Failed to retrieve team: ' + $routeParams.team_id +
|
ProcessErrors($scope, data, status, form, { hdr: 'Error!', msg: 'Failed to retrieve team: ' + $routeParams.team_id +
|
||||||
|
|||||||
Reference in New Issue
Block a user