-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add taxonomy autocomplete feature to search-a-licious #60
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your PR :)
I've added a couple of comments
app/openfoodfacts.py
Outdated
"count": response.hits.total["value"] | ||
} | ||
options = [] | ||
for field in response.suggest: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not mandatory, but you can use for field, suggestions in response.suggest.items()
to avoid doing response.suggest[field][0]
above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest is not a regular dict but a AttrDict so it doesn't have items()
Thank you so much @frankbaele for your contribution ! |
What