From bc45c04c447bf154691541e4e81dd87f1eb66836 Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Thu, 3 Nov 2016 10:23:48 -0400 Subject: [PATCH] Quick fix for creating a credential. This addresses a bug where a javascript error would be thrown when creating a machine credential with no password prompt (and probably other types of credentials). --- awx/ui/client/src/helpers/Credentials.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/ui/client/src/helpers/Credentials.js b/awx/ui/client/src/helpers/Credentials.js index 704c2d4aa8..f965ec2ac4 100644 --- a/awx/ui/client/src/helpers/Credentials.js +++ b/awx/ui/client/src/helpers/Credentials.js @@ -245,7 +245,7 @@ angular.module('CredentialsHelper', ['Utilities']) } data.kind = scope.kind.value; - if (scope.become_method === null) { + if (scope.become_method === null || typeof scope.become_method === 'undefined') { data.become_method = ""; data.become_username = ""; data.become_password = "";