From eacf6a591bf8419168705bcfe2d02879f6c0ed90 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Thu, 18 Jun 2015 11:08:03 -0400 Subject: [PATCH] fixed nested host typeerror --- awx/ui/static/js/helpers/Groups.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/awx/ui/static/js/helpers/Groups.js b/awx/ui/static/js/helpers/Groups.js index 9dd2a68073..499d548346 100644 --- a/awx/ui/static/js/helpers/Groups.js +++ b/awx/ui/static/js/helpers/Groups.js @@ -931,8 +931,16 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name if (modal_scope.groupVariablesLoadedRemove) { modal_scope.groupVariablesLoadedRemove(); } - modal_scope.groupVariablesLoadedRemove = modal_scope.$on('groupVariablesLoaded', function () { - modal_scope.showSourceTab = (mode === 'edit' && group.has_inventory_sources && Empty(group.summary_fields.inventory_source.source) && sources_scope.source.value!=='manual') ? false : true; + modal_scope.groupVariablesLoadedRemove = modal_scope.$on('groupVariablesLoaded', function () { + if (mode === 'edit' && + group.has_inventory_sources && + Empty(group.summary_fields.inventory_source.source) && + sources_scope.source && + sources_scope.source.value !== 'manual') { + modal_scope.showSourceTab = false; + } else { + modal_scope.showSourceTab = true; + } modal_scope.showSchedulesTab = (mode === 'edit' && sources_scope.source && sources_scope.source.value!=='manual') ? true : false; if (mode === 'edit' && modal_scope.showSourceTab) { // the use has access to the source tab, so they may create a schedule