diff --git a/lib/ProductOpener/Ingredients.pm b/lib/ProductOpener/Ingredients.pm index 29879f6a83e79..3bb1071b902c1 100644 --- a/lib/ProductOpener/Ingredients.pm +++ b/lib/ProductOpener/Ingredients.pm @@ -3181,9 +3181,10 @@ sub analyze_ingredients ($product_ref) { } } - # Vegetable oil (rapeseed oil, ...) : ignore "from_palm_oil:en:maybe" if the ingredient has sub-ingredients - if ( ($property eq "from_palm_oil") - and (defined $value) + # if the property value is "maybe" and the ingredient has sub-ingredients, + # we ignore the ingredient and only look at its sub-ingredients (already added) + # e.g. "Vegetable oil (rapeseed oil, ...)"" + if ( (defined $value) and ($value eq "maybe") and (defined $ingredient_ref->{ingredients})) { diff --git a/taxonomies/ingredients.txt b/taxonomies/ingredients.txt index 1492a148f5014..e4eba15a3cdcd 100644 --- a/taxonomies/ingredients.txt +++ b/taxonomies/ingredients.txt @@ -1,3 +1,5 @@ +# properties vegan:en, vegetarian:en and from_palm_oil:en can have values yes, no, maybe +# in the case of maybe, if the ingredient has sub-ingredients, then only its sub-ingredients are considered #comment:en:These are synonyms of ingredients @@ -35431,8 +35433,8 @@ pl:sok, soki, soku, soków pt:Sumo ru:Сок # ingredient/fr:jus has 156 products in 4 languages @2019-02-02 -vegan:en:ignore -vegetarian:en:ignore +vegan:en:maybe +vegetarian:en:maybe