-
-
Notifications
You must be signed in to change notification settings - Fork 387
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: nutripatrol product report #10991
base: main
Are you sure you want to change the base?
Conversation
/update_tests_results |
/update_tests_results |
] | ||
"json" : "{\n \"level\": \"info\",\n \"topics\": [\n \"problem\"\n ],\n \"expand_for\": \"large\",\n \"evaluation\": \"neutral\",\n \"title_element\": {\n \"title\": \"Incomplete or incorrect information?\",\n \"subtitle\": \"Category, labels, ingredients, allergens, nutritional information, photos etc.\",\n \"icon_url\": \"http://static.openfoodfacts.localhost/images/logos/off-logo-icon-light.svg\"},\n \"elements\": [\n {\n \"element_type\": \"text\",\n \"text_element\": {\n \"html\": `\n If the information does not match the information on the packaging, you can complete or correct it. Thank you!\n Open Food Facts is a collaborative database, and every contribution is useful for all.\n }},\n {\n \"element_type\": \"action\",\n \"action_element\": {\n \"html\": \"\",\n \"actions\": [\"edit_product\"]\n }\n }]\n}", | ||
"json_debug_url" : "http://static.openfoodfacts.localhost/files/debug/knowledge_panels/incomplete_or_incorrect_data0200000000034.json", | ||
"json_error" : "malformed JSON string, neither tag, array, object, number, string or atom, at character offset 519 (before \"`\\n I...\") at /opt/product-opener/lib/ProductOpener/KnowledgePanels.pm line 411.\n", |
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.
There's a typo in the template, fixing it.
/update_tests_results |
if (defined $actions_urls{$action}) { | ||
$url .= $actions_urls{$action}; | ||
my $action_url = $actions_urls{$action}; | ||
if ($action_url =~ /^#/) { |
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.
The "edit_product" action has an empty url "" because before we always started with the edit form URL. So we need a change like this:
if ($action_url =~ /^#/) { | |
if (($action eq '') or (($action_url =~ /^#/)) { |
Quality Gate passedIssues Measures |
First Nutri-Patrol integration.