From 863d962ec29bb575fcdafb7e10834f56f9c353eb Mon Sep 17 00:00:00 2001 From: mabashian Date: Mon, 17 Jun 2019 07:40:08 -0400 Subject: [PATCH] Ensure inventory_obj is on scope before checking it --- .../smart-inventory/edit/smart-inventory-edit.controller.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/edit/smart-inventory-edit.controller.js b/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/edit/smart-inventory-edit.controller.js index 5ccf89c102..42f7f27223 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/edit/smart-inventory-edit.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/smart-inventory/edit/smart-inventory-edit.controller.js @@ -37,6 +37,8 @@ function SmartInventoryEdit($scope, $location, $scope.parseType = 'yaml'; + $scope.inventory_obj = inventoryData; + $rootScope.breadcrumb.inventory_name = inventoryData.name; ParseTypeChange({ scope: $scope, @@ -51,9 +53,6 @@ function SmartInventoryEdit($scope, $location, $scope.canEditOrg = canEditOrg; }); - $scope.inventory_obj = inventoryData; - $rootScope.breadcrumb.inventory_name = inventoryData.name; - $scope.smart_hosts = { host_filter: encodeURIComponent($scope.host_filter) };