-
-
Notifications
You must be signed in to change notification settings - Fork 406
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: make facets URLS /nova-group/unknown work #10498
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10498 +/- ##
==========================================
- Coverage 49.54% 49.33% -0.22%
==========================================
Files 67 76 +9
Lines 20650 21706 +1056
Branches 4980 5209 +229
==========================================
+ Hits 10231 10708 +477
- Misses 9131 9683 +552
- Partials 1288 1315 +27 ☔ View full report in Codecov by Sentry. |
lib/ProductOpener/Display.pm
Outdated
@@ -4819,6 +4819,8 @@ sub add_params_to_query ($request_ref, $query_ref) { | |||
if $log->is_debug(); | |||
|
|||
# if the value is "unknown", we need to add a condition on the field being empty | |||
|
|||
my @tagtype_allowing_unknown_as_value = qw(nutrition_grades nova_groups ecoscore); |
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.
Can you add pnns_groups_1, pnns_groups_2 and food_groups?
lib/ProductOpener/Display.pm
Outdated
@@ -4831,7 +4833,7 @@ sub add_params_to_query ($request_ref, $query_ref) { | |||
) | |||
) | |||
and ($tagtype !~ /^pnns_groups_/) |
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.
pnns_groups_1 / 2 can be included in @tagtype_allowing_unknown_as_value
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!
What
Few tags like NOVA, Eco-Score and Nutri-Score can have an "unknown" value. Instead of looking for the presence or absence of the tag, we look for the value to be "unknown" (or not-applicable).
Screenshot
Related issue(s) and discussion