Skip to content

Commit

Permalink
fix: disable temporarily en:eu-non-agriculture and en:eu-agriculture
Browse files Browse the repository at this point in the history
See #1245
  • Loading branch information
raphael0202 committed Aug 29, 2023
1 parent 51a19fa commit 043b96c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions robotoff/insights/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,10 @@ def is_prediction_valid(product: Optional[Product], tag: str) -> bool:
# Predictions are always valid when product check is disabled
# (product=None)
return True
# We disable temporarily en:eu-agriculture and en:non-eu-agriculture
# See https://github.com/openfoodfacts/robotoff/issues/1245
if tag in ("en:eu-agriculture", "en:non-eu-agriculture"):
return False
return not (
tag in product.labels_tags
or LabelInsightImporter.is_parent_label(tag, set(product.labels_tags))
Expand Down

0 comments on commit 043b96c

Please sign in to comment.