diff --git a/awx/ui/client/src/inventories/manage/manage-groups/directive/manage-groups.directive.controller.js b/awx/ui/client/src/inventories/manage/manage-groups/directive/manage-groups.directive.controller.js index 0b57ddbf1e..a22f80e608 100644 --- a/awx/ui/client/src/inventories/manage/manage-groups/directive/manage-groups.directive.controller.js +++ b/awx/ui/client/src/inventories/manage/manage-groups/directive/manage-groups.directive.controller.js @@ -37,7 +37,6 @@ function manageGroupsDirectiveController($filter, $location, $log, Rest.get() .success(function(data) { group = data; - $scope.source_id = data.related.inventory_source.split('/')[4]; for (var fld in form.fields) { if (data[fld]) { $scope[fld] = data[fld]; @@ -47,6 +46,7 @@ function manageGroupsDirectiveController($filter, $location, $log, if(mode === 'edit') { $scope.variable_url = data.related.variable_data; $scope.source_url = data.related.inventory_source; + $scope.source_id = data.related.inventory_source.split('/')[4]; $scope.$emit('LoadSourceData'); } })