From 2c68d4a32bb13c01c8a6347f30a159ddb5e12383 Mon Sep 17 00:00:00 2001 From: jedi Date: Wed, 17 Jul 2024 19:03:47 +0200 Subject: [PATCH] stash --- core/inventory/api_v2.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/inventory/api_v2.py b/core/inventory/api_v2.py index d8ace2c..012f2e2 100644 --- a/core/inventory/api_v2.py +++ b/core/inventory/api_v2.py @@ -23,10 +23,7 @@ class ContainerViewSet(viewsets.ModelViewSet): def filter_items(items, query): query_tokens = query.split(' ') for item in items: - item_tokens = item.name.split(' ') - if all(token in item_tokens for token in query_tokens): - yield item - elif all(token in item.description for token in query_tokens): + if all(token in item.description for token in query_tokens): yield item @api_view(['GET'])