servings default to 1 on import

This commit is contained in:
vabene1111 2021-02-15 15:16:15 +01:00
parent 84591fd17a
commit 777f4518be

View File

@ -224,7 +224,7 @@ def find_recipe_json(ld_json, url):
ld_json['servings'] = int(re.findall(r'\b\d+\b', ld_json['recipeYield'])[0])
except Exception as e:
print(e)
ld_json['servings'] = 0
ld_json['servings'] = 1
for key in list(ld_json):
if key not in [