1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

fixed issue with deleting a project and then trying to add a new one in the job template page

This commit is contained in:
Jared Tabor 2014-08-08 16:07:36 -04:00
parent 1f5f45a162
commit 4f8a86b3fe

View File

@ -252,7 +252,7 @@ function JobTemplatesAdd($scope, $rootScope, $compile, $location, $log, $routePa
if ($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);
checkSCMStatus(oldval, newval);
});
@ -467,7 +467,7 @@ function JobTemplatesEdit($scope, $rootScope, $compile, $location, $log, $routeP
if ($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) {
$scope.playbook = null;
getPlaybooks($scope.project);