-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
fix: greenscore attribute with old ecoscore_data #11212
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #11212 +/- ##
==========================================
+ Coverage 49.22% 49.25% +0.03%
==========================================
Files 78 78
Lines 22405 22418 +13
Branches 5374 5372 -2
==========================================
+ Hits 11028 11043 +15
+ Misses 10020 10019 -1
+ Partials 1357 1356 -1 ☔ View full report in Codecov by Sentry. |
/update_tests_results |
Quality Gate passedIssues Measures |
🤖 I have created a release *beep* *boop* --- ## [2.54.0](v2.53.0...v2.54.0) (2025-01-10) ### Features * gzip js, css, SVG icons assets ([#11208](#11208)) ([c0a5275](c0a5275)) ### Bug Fixes * "NutriScore V2" SVGs with blank space ([#11218](#11218)) ([38d79e8](38d79e8)) * avoid crash in display_orgs_table when org.created_t is not set, fix permission ([#11203](#11203)) ([765d796](765d796)) * greenscore attribute with old ecoscore_data ([#11212](#11212)) ([4f596ad](4f596ad)) * Invalid OFF dark icon ([#11206](#11206)) ([f63daa8](f63daa8)) * Nutripatrol url trailing slash removal regex ([#11204](#11204)) ([f42f8dd](f42f8dd)) * Nutriscore for fresh herbs ([#11112](#11112)) ([cdd7cf5](cdd7cf5)) * Remove irrelevant things in Config_obf.pm ([c5d448d](c5d448d)) * Remove irrelevant things in the Open Beauty Facts config ([#11195](#11195)) ([c5d448d](c5d448d)) * remove warning in Display.pm related to Environmental Scoring ([#11172](#11172)) ([176fe9e](176fe9e)) * Removing irrelevant fields in the Open Products Facts config ([4583ed2](4583ed2)) * Removing irrelevant fields in the Open Products Facts config ([#11202](#11202)) ([4583ed2](4583ed2)) * typo in ecoscore redirect ([#11213](#11213)) ([85fd575](85fd575)) * use ecoscore data when greenscore not available ([#11197](#11197)) ([5ae1273](5ae1273)) * warnings in producers tests ([#11190](#11190)) ([0588976](0588976)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Alex Garel <[email protected]>
This PR fixes an issue with the new Green-Score on some products in some countries.
When we still have the old ecoscore_data field, and not the new environmental_score_data field, we use the older ecoscore_data to compute attributes and knowledge panels.
However, for attributes, some parts of the code also reference environmental_score_grade, which we didn't copy. For most countries, this was overriden by the local scores we have in ecoscore_data. But for countries like Russia, the bug could be seen: #11184
More and more products have the new environmental_score_data field, so the bug is less present, but it can still be seen when loading an older revision of a product: https://ru.openfoodfacts.org/%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82/8076800195057/spaghetti-n-5-barilla-norge-as?rev=3517