stash
This commit is contained in:
parent
8f6041ffa5
commit
d7b814cfc0
1 changed files with 1 additions and 4 deletions
|
@ -23,10 +23,7 @@ class ContainerViewSet(viewsets.ModelViewSet):
|
||||||
def filter_items(items, query):
|
def filter_items(items, query):
|
||||||
query_tokens = query.split(' ')
|
query_tokens = query.split(' ')
|
||||||
for item in items:
|
for item in items:
|
||||||
item_tokens = item.name.split(' ')
|
if all(token in item.description for token in query_tokens):
|
||||||
if all(token in item_tokens for token in query_tokens):
|
|
||||||
yield item
|
|
||||||
elif all(token in item.description for token in query_tokens):
|
|
||||||
yield item
|
yield item
|
||||||
|
|
||||||
@api_view(['GET'])
|
@api_view(['GET'])
|
||||||
|
|
Loading…
Reference in a new issue