From a419b592454da8e89e4c75abb64503eb363d12d2 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Thu, 23 Jul 2015 03:12:00 -0400 Subject: [PATCH] allow clearing of credential become --- awx/ui/static/js/helpers/Credentials.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/awx/ui/static/js/helpers/Credentials.js b/awx/ui/static/js/helpers/Credentials.js index a6edd56281..47932557bf 100644 --- a/awx/ui/static/js/helpers/Credentials.js +++ b/awx/ui/static/js/helpers/Credentials.js @@ -218,7 +218,11 @@ angular.module('CredentialsHelper', ['Utilities']) } data.kind = scope.kind.value; - data.become_method = (scope.become_method.value) ? scope.become_method.value : ""; + if (scope.become_method === null) { + data.become_method = ""; + } else { + data.become_method = (scope.become_method.value) ? scope.become_method.value : ""; + } switch (data.kind) { case 'ssh': data.password = scope.ssh_password;