diff --git a/awx/ui/client/src/search/tagSearch.block.less b/awx/ui/client/src/search/tagSearch.block.less index f242d1b2d1..75ccca2938 100644 --- a/awx/ui/client/src/search/tagSearch.block.less +++ b/awx/ui/client/src/search/tagSearch.block.less @@ -56,6 +56,7 @@ border: 1px solid @d7grey; background: white; padding: 5px 0; + border-top: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; z-index: 50000; diff --git a/awx/ui/client/src/search/tagSearch.controller.js b/awx/ui/client/src/search/tagSearch.controller.js index 52a86238df..3595db3712 100644 --- a/awx/ui/client/src/search/tagSearch.controller.js +++ b/awx/ui/client/src/search/tagSearch.controller.js @@ -74,7 +74,7 @@ export default ['$scope', 'Refresh', 'tagSearchService', .getCurrentTags($scope .currentSearchFilters); - if (!tagSearchService.isDuplicate(tags, newTag)) { + if (!tagSearchService.isDuplicate(tags, newTag) && !!newTag.name) { tags.push(newTag); $scope.updateSearch(tags); } diff --git a/awx/ui/client/src/search/tagSearch.service.js b/awx/ui/client/src/search/tagSearch.service.js index 641c48736b..be1a24b729 100644 --- a/awx/ui/client/src/search/tagSearch.service.js +++ b/awx/ui/client/src/search/tagSearch.service.js @@ -180,7 +180,7 @@ export default ['Rest', '$q', 'GetBasePath', 'Wait', 'ProcessErrors', '$log', fu if (tag.type === "text") { tag.url = tag.value + "__icontains=" + textVal; tag.name = textVal; - } else if (selectVal.value.indexOf("=") > 0) { + } else if (selectVal.value && typeof selectVal.value === 'string' && selectVal.value.indexOf("=") > 0) { tag.url = selectVal.value; tag.name = selectVal.label; } else {