mirror of
https://github.com/magnum-opus-tender-hack/backend.git
synced 2024-11-24 10:13:44 +03:00
add service
This commit is contained in:
parent
17e1c066a4
commit
0cfbc38eda
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