openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
http://openfoodfacts.github.io/openfoodfacts-server/
GNU Affero General Public License v3.0
658 stars 388 forks source link

Fat_Unit not sent/present in this product #586

Open teolemon opened 7 years ago

teolemon commented 7 years ago

Bug found at https://github.com/openfoodfacts/OpenFoodFacts-androidApp/issues/357

For the product 3017620429484 (http://fr.openfoodfacts.org/produit/3017620429484/nutella-ferrero), the fat unit "g" is not displayed in the nutrition tab (in the Android app) : it just shows fat : high (31.6).

in the JSON API http://world.openfoodfacts.org/api/v0/product/3017620429484.json, we use the field fat_unit which is not present for this product.

hangy commented 7 years ago

According to the log, the nutrients were last edited in 2013. Maybe the nutrient table feature was updated/modified after that, and this product wasn't fixed? From a software point of view, the problem is probably too old to analyze it now. It's should be easy to fix it by editing the unit, ie. from 31.6 g to 31600 mg (to force Product Opener to update the nutrients).

teolemon commented 7 years ago

Looks like a script we should run on all products to ensure there's no trace left (pun intended)?