diff --git a/awx/ui/client/src/shared/smart-search/queryset.service.js b/awx/ui/client/src/shared/smart-search/queryset.service.js index 877222da11..10ae7ef3c8 100644 --- a/awx/ui/client/src/shared/smart-search/queryset.service.js +++ b/awx/ui/client/src/shared/smart-search/queryset.service.js @@ -264,13 +264,13 @@ export default ['$q', 'Rest', 'ProcessErrors', '$rootScope', 'Wait', 'DjangoSear this.error(response.data, response.status); - return response; + throw response; }.bind(this)); }, error(data, status) { - ProcessErrors($rootScope, data, status, null, { + ProcessErrors($rootScope, null, status, null, { hdr: 'Error!', - msg: 'Call to ' + this.url + '. GET returned: ' + status + msg: "Invalid search term entered." }); } }; diff --git a/awx/ui/client/src/shared/smart-search/smart-search.controller.js b/awx/ui/client/src/shared/smart-search/smart-search.controller.js index 6c10c1d752..ff4c54b52c 100644 --- a/awx/ui/client/src/shared/smart-search/smart-search.controller.js +++ b/awx/ui/client/src/shared/smart-search/smart-search.controller.js @@ -182,8 +182,11 @@ export default ['$stateParams', '$scope', '$state', 'QuerySet', 'GetBasePath', ' else { encodeParams.searchTerm = true; } + removed = qs.encodeParam(encodeParams); + } + else { + removed = setDefaults(termParts[termParts.length-1]); } - removed = qs.encodeParam(encodeParams); } removeFromQuerySet(queryset); if(!$scope.querySet) {