Skip to content

Commit

Permalink
fix: garder aussi les code-barres EAN8 (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn authored Mar 22, 2024
1 parent a6a11e5 commit e0a64b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/data/epicerie_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ def extract_products_codes(self):
pass

def transform_products_codes(self):
self.products_codes = [code for code in self.products_codes if len(str(code)) == 13]
"""
keep only EAN8 & EAN13 codes
"""
self.products_codes = [code for code in self.products_codes if len(str(code)) in [8, 13]]
if os.environ.get("DEBUG"):
self.products_codes = self.products_codes[0:50]

Expand Down

0 comments on commit e0a64b0

Please sign in to comment.