mirror of
https://github.com/magnum-opus-tender-hack/backend.git
synced 2024-11-25 10:43:44 +03:00
commit
7b3b3391d6
8
app/search/services/hints.py
Normal file
8
app/search/services/hints.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from search.models import Product, Category
|
||||
|
||||
|
||||
def get_hints(content: str) -> str:
|
||||
category = 'Unknown'
|
||||
if content in list(map(lambda product: product.name, Product.objects.all())):
|
||||
category = 'Name'
|
||||
return category
|
Loading…
Reference in New Issue
Block a user