Merge pull request #5349 from mabashian/5264-scan-job-template

Set project/playbook to defaults when null
This commit is contained in:
Michael Abashian 2017-02-14 14:58:25 -05:00 committed by GitHub
commit 0a679b32bd
2 changed files with 2 additions and 6 deletions

View File

@ -155,8 +155,7 @@ angular.module('JobTemplatesHelper', ['Utilities'])
scope.can_edit = data.summary_fields.user_capabilities.edit;
if (scope.project === "" && scope.playbook === "") {
if ((!scope.project || scope.project === "") && (!scope.playbook || scope.playbook === "")) {
scope.resetProjectToDefault();
}

View File

@ -53,10 +53,6 @@ export default
$scope.parseType = 'yaml';
$scope.showJobType = false;
if($scope.job_type && $scope.job_type.value === 'scan' && !$scope.project) {
$scope.project_name = 'Default';
}
SurveyControllerInit({
scope: $scope,
parent_scope: $scope,
@ -270,6 +266,7 @@ export default
var dft;
master = masterObject;
getPlaybooks($scope.project);
dft = ($scope.host_config_key === "" || $scope.host_config_key === null) ? false : true;