Setting the local var CredentialList to the deep clone seems to be problematic. Moving this out so that the original object itself is overwritten which is how it's done in other places. (#3017)

This commit is contained in:
Michael Abashian
2016-07-14 23:10:26 -04:00
committed by Leigh Johnson
parent fc304899bd
commit 8c85035d18

View File

@@ -25,7 +25,6 @@ angular.module('JobTemplatesHelper', ['Utilities'])
return function(params) {
var scope = params.scope,
CredentialList = _.cloneDeep(CredentialList),
defaultUrl = GetBasePath('job_templates'),
// generator = GenerateForm,
form = JobTemplateForm(),
@@ -37,6 +36,8 @@ angular.module('JobTemplatesHelper', ['Utilities'])
// checkSCMStatus, getPlaybooks, callback,
// choicesCount = 0;
CredentialList = _.cloneDeep(CredentialList);
// The form uses awPopOverWatch directive to 'watch' scope.callback_help for changes. Each time the
// popover is activated, a function checks the value of scope.callback_help before constructing the content.
scope.setCallbackHelp = function() {