Skip to content
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

Wrong invalid barcode warning #1322

Open
aleene opened this issue Jan 25, 2025 · 6 comments
Open

Wrong invalid barcode warning #1322

aleene opened this issue Jan 25, 2025 · 6 comments

Comments

@aleene
Copy link

aleene commented Jan 25, 2025

What

The case is a product (https://world.openfoodfacts.org/product/2000000152012/delice-de-chataignes-asso-agroulis) which does not have a barcode. I added the product to OFF and then added it to the receipt. This works OK, but I get an error, see image.

Expected behavior

no, maybe recognise it as a barcode less product.

Screenshots

Image
@raphodn
Copy link
Member

raphodn commented Jan 25, 2025

How did you choose the barcode then ? ^^
You could have chosen one with a "valid" luhn algorithm EAN 13

@raphodn
Copy link
Member

raphodn commented Jan 25, 2025

I do see now and then some products without barcodes (wine for instance). But they usually have one in the shop system somehow, no ?

@aleene
Copy link
Author

aleene commented Jan 25, 2025

I created it on OFF by "add a product without a barcode", so OFF makes up an invalid barcode.

@raphodn
Copy link
Member

raphodn commented Jan 25, 2025

Oh ok i didn't know that was possible !

I'll look into the API if this field is returned, we could store it, and indeed hide this info for these products "without barcodes"

@raphodn
Copy link
Member

raphodn commented Jan 26, 2025

Hmm there doesn't seem to be any info returned from the API indicating that the product is "without a barcode" :(
https://world.openfoodfacts.org/api/v2/product/2000000152012

@aleene
Copy link
Author

aleene commented Jan 26, 2025

Guess you have to trigger it on: barcode starts with "200000". I guess @stephanegigandet can confirm how it wirks in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants