From 8df6dc0ca011f5aabce4760ae68c8e2f8625a7ae Mon Sep 17 00:00:00 2001 From: Keith Grant Date: Mon, 2 Nov 2020 11:24:01 -0800 Subject: [PATCH] fix SmartInventoryForm chips --- awx/ui_next/src/components/Lookup/HostFilterLookup.jsx | 2 +- .../src/screens/Inventory/shared/SmartInventoryForm.test.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/ui_next/src/components/Lookup/HostFilterLookup.jsx b/awx/ui_next/src/components/Lookup/HostFilterLookup.jsx index f8f7d56d84..13a89512ea 100644 --- a/awx/ui_next/src/components/Lookup/HostFilterLookup.jsx +++ b/awx/ui_next/src/components/Lookup/HostFilterLookup.jsx @@ -196,7 +196,7 @@ function HostFilterLookup({ function buildChips(filter = {}) { const inputGroupChips = Object.keys(filter).reduce((obj, param) => { - const parsedKey = param.replace('__icontains', '').replace('or__', ''); + const parsedKey = param.replace('or__', ''); const chipsArray = []; if (Array.isArray(filter[param])) { diff --git a/awx/ui_next/src/screens/Inventory/shared/SmartInventoryForm.test.jsx b/awx/ui_next/src/screens/Inventory/shared/SmartInventoryForm.test.jsx index 34d7fb72c7..3f26decf00 100644 --- a/awx/ui_next/src/screens/Inventory/shared/SmartInventoryForm.test.jsx +++ b/awx/ui_next/src/screens/Inventory/shared/SmartInventoryForm.test.jsx @@ -26,7 +26,7 @@ const mockFormValues = { description: '', organization: { id: 1, name: 'mock organization' }, host_filter: - 'name__icontains=mock and name__icontains=foo and groups__name=mock group', + 'name__icontains=mock and name__icontains=foo and groups__name__icontains=mock group', instance_groups: [{ id: 123 }], variables: '---', };