mirror of
https://github.com/magnum-opus-tender-hack/backend.git
synced 2024-11-25 18:53:43 +03:00
fixed hints
This commit is contained in:
parent
b683d2e444
commit
dff46d3717
|
@ -2,7 +2,7 @@ from search.models import Product, Category, Characteristic
|
||||||
|
|
||||||
|
|
||||||
def get_hints(content: str) -> str:
|
def get_hints(content: str) -> str:
|
||||||
category = "Unknown"
|
category = "All"
|
||||||
if content in list(map(lambda product: product.name, Product.objects.all())):
|
if content in list(map(lambda product: product.name, Product.objects.all())):
|
||||||
category = "Name"
|
category = "Name"
|
||||||
elif content in list(map(lambda category: category.name, Category.objects.all())):
|
elif content in list(map(lambda category: category.name, Category.objects.all())):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user