Self hosted FLOSS fitness/workout, nutrition and weight tracker
Skip products with no name
Roland Geiderf740f84b6f82
diff --git a/extras/scripts/create_ingredients_from_foodfacts.py b/extras/scripts/create_ingredients_from_foodfacts.pyindex 9916e056f..f0ce5d8a0 100644--- a/extras/scripts/create_ingredients_from_foodfacts.py+++ b/extras/scripts/create_ingredients_from_foodfacts.py@@ -35,6 +35,12 @@ for product in db.products.find({'lang': {"$in": langs}}):else:continue+ # Some products have no name, skipping+ if not name:+ continue++ print(f'Processing {name}...')+# these are optionalsodium = product['nutriments'].get('sodium_100g', None)fibre = product['nutriments'].get('fiber_100g', None)