mirror of
https://github.com/ansible/awx.git
synced 2026-03-22 11:25:08 -02:30
fixed issue with deleting a project and then trying to add a new one in the job template page
This commit is contained in:
@@ -252,7 +252,7 @@ function JobTemplatesAdd($scope, $rootScope, $compile, $location, $log, $routePa
|
|||||||
if ($scope.selectPlaybookUnregister) {
|
if ($scope.selectPlaybookUnregister) {
|
||||||
$scope.selectPlaybookUnregister();
|
$scope.selectPlaybookUnregister();
|
||||||
}
|
}
|
||||||
$scope.selectPlaybookUnregister = $scope.$watch('project_name', function (oldval, newval) {
|
$scope.selectPlaybookUnregister = $scope.$watch('project_name', function (newval, oldval) {
|
||||||
selectPlaybook(oldval, newval);
|
selectPlaybook(oldval, newval);
|
||||||
checkSCMStatus(oldval, newval);
|
checkSCMStatus(oldval, newval);
|
||||||
});
|
});
|
||||||
@@ -467,7 +467,7 @@ function JobTemplatesEdit($scope, $rootScope, $compile, $location, $log, $routeP
|
|||||||
if ($scope.watchProjectUnregister) {
|
if ($scope.watchProjectUnregister) {
|
||||||
$scope.watchProjectUnregister();
|
$scope.watchProjectUnregister();
|
||||||
}
|
}
|
||||||
$scope.watchProjectUnregister = $scope.$watch('project_name', function (oldValue, newValue) {
|
$scope.watchProjectUnregister = $scope.$watch('project_name', function (newValue, oldValue) {
|
||||||
if (oldValue !== newValue && newValue !== '' && newValue !== null && newValue !== undefined) {
|
if (oldValue !== newValue && newValue !== '' && newValue !== null && newValue !== undefined) {
|
||||||
$scope.playbook = null;
|
$scope.playbook = null;
|
||||||
getPlaybooks($scope.project);
|
getPlaybooks($scope.project);
|
||||||
|
|||||||
Reference in New Issue
Block a user