Skip to content

Commit

Permalink
fix: fix NutritionImageImporter.is_conflicting_insight
Browse files Browse the repository at this point in the history
we should only compare value_tag, otherwise we get several insights per
product, for different images.
  • Loading branch information
raphael0202 committed Apr 26, 2023
1 parent 2fab3ce commit 581376e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions robotoff/insights/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,10 +1105,7 @@ def is_conflicting_insight(
cls, candidate: ProductInsight, reference: ProductInsight
) -> bool:
# `value_tag` contains the main language of the product
return (
candidate.value_tag == reference.value_tag
and candidate.source_image == reference.source_image
)
return candidate.value_tag == reference.value_tag

@staticmethod
def sort_fn(prediction: Prediction) -> int:
Expand Down

0 comments on commit 581376e

Please sign in to comment.