Closed teolemon closed 2 years ago
@teolemon If you have a look at the server data in https://world.openfoodfacts.org/api/v2/product/3760324840351?fields=categories&lc=fr&cc=fr, this is what you get for categories
(similar results for categories_tags
and https://world.openfoodfacts.org/api/v2/product/3760324840351?fields=categories_tags&lc=fr&cc=f):
As we take the last one - which we assumed to be the most detailed - we take "fr:Vegan". Is that an issue on the server side? Should we here in smoothie take the last English category?
that's not a simple question, and not as simple as taking the last English category (eg wines) @stephanegigandet @alexgarel any ideas ? we'd basically need a boolean indicating whether the category is taxonomized or not
As suggested by @teolemon we should pick only a taxonomized category, I will change the code on the server side so that we compare only to taxonomized categories (it's not only the compare button, but also the nutrition facts table knowledge panel).
@monsieurtanuki Can you change the app code so that we don't pick the last one, but the one referenced in the compared_to_category field? https://world.openfoodfacts.org/api/v2/product/3760324840351?fields=categories_tags,compared_to_category&lc=fr&cc=f&
Right not it contains fr:vegan, but I'll change it server side.
Server side part: https://github.com/openfoodfacts/openfoodfacts-server/issues/6853
The very short term fix is to remove the category "vegan" from those 25 products. This bug might affect a few more bogus categories, but probably not many products.
What
Steps to reproduce the behavior
Expected behavior
Comparison to Hazelnut spreads
Screenshot/Mockup/Before-After