diff --git a/awx/ui/client/src/inventories/manage/groups/groups-add.controller.js b/awx/ui/client/src/inventories/manage/groups/groups-add.controller.js index dff577c546..e6b03148f8 100644 --- a/awx/ui/client/src/inventories/manage/groups/groups-add.controller.js +++ b/awx/ui/client/src/inventories/manage/groups/groups-add.controller.js @@ -19,7 +19,7 @@ var params, source; // group fields var group = { - variables: $scope.variables === ('---' || '{}') ? null : $scope.variables, + variables: $scope.variables === '---' || $scope.variables === '{}' ? null : $scope.variables, name: $scope.name, description: $scope.description, inventory: inventoryData.id @@ -28,7 +28,7 @@ // inventory_source fields params = { instance_filters: $scope.instance_filters, - source_vars: $scope[$scope.source.value + '_variables'] === ('---' || '{}') ? null : $scope[$scope.source.value + '_variables'], + source_vars: $scope[$scope.source.value + '_variables'] === '---' || $scope[$scope.source.value + '_variables'] === '{}' ? null : $scope[$scope.source.value + '_variables'], source_script: $scope.inventory_script, source: $scope.source.value, credential: $scope.credential, @@ -82,7 +82,7 @@ } }; $scope.sourceChange = function(source){ - source = source.value === 'azure_rm' ? 'azure' : source.value; + source = source.value; if (source === 'custom'){ LookUpInit({ scope: $scope, diff --git a/awx/ui/client/src/inventories/manage/groups/groups-edit.controller.js b/awx/ui/client/src/inventories/manage/groups/groups-edit.controller.js index 6b60ebfa38..91e11e1343 100644 --- a/awx/ui/client/src/inventories/manage/groups/groups-edit.controller.js +++ b/awx/ui/client/src/inventories/manage/groups/groups-edit.controller.js @@ -20,7 +20,7 @@ var params, source; // group fields var group = { - variables: $scope.variables === ('---' || '{}') ? null : $scope.variables, + variables: $scope.variables === '---' || $scope.variables === '{}' ? null : $scope.variables, name: $scope.name, description: $scope.description, inventory: $scope.inventory, @@ -233,7 +233,7 @@ if (inventorySourceData.source !== 'custom'){ LookUpInit({ scope: $scope, - url: GetBasePath('credentials') + (inventorySourceData.source === '' ? '' : 'kind=' + (inventorySourceData.source)), + url: GetBasePath('credentials') + (inventorySourceData.source === '' ? '' : '?kind=' + (inventorySourceData.source)), form: form, list: CredentialList, field: 'credential',