What
- API disallows prices created with same value between discounts and full price
- However, AI detection sometimes does put the same values
- This leads to price creation returning an (unhandled) error, and failing to create prices, without displaying any issue to the user.
Two things should be done:
- After calling the API, handle price creation errors, and display to users when only part of the prices were created, and why
- Before calling the API, consider discounted prices with same values as invalid, and show why. This should be handled the same way as a price missing, for example.
We could also automatically remove the discount flag and discounted price, but I'm not sure that it's clean. Usually the AI is right that the price was discounted, but failed to guess the value. So user input is required.
Example proof https://prices.openfoodfacts.org/experiments/receipt-assistant?proof_ids=92592
What
Two things should be done:
We could also automatically remove the discount flag and discounted price, but I'm not sure that it's clean. Usually the AI is right that the price was discounted, but failed to guess the value. So user input is required.
Example proof https://prices.openfoodfacts.org/experiments/receipt-assistant?proof_ids=92592