fixed hints

This commit is contained in:
Alexander Karpov 2022-10-22 18:21:42 +03:00
parent b683d2e444
commit dff46d3717

View File

@ -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())):