From e2b1115b3b3c27d02c773d4084205304be3224f4 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Sat, 20 Feb 2021 18:50:28 +0100 Subject: [PATCH] fixed servings blank --- cookbook/helper/recipe_url_import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/helper/recipe_url_import.py b/cookbook/helper/recipe_url_import.py index 0ff4f1c9..f6b3e478 100644 --- a/cookbook/helper/recipe_url_import.py +++ b/cookbook/helper/recipe_url_import.py @@ -218,13 +218,13 @@ def find_recipe_json(ld_json, url): else: ld_json['prepTime'] = 0 + ld_json['servings'] = 1 try: if 'recipeYield' in ld_json: if type(ld_json['recipeYield']) == str: ld_json['servings'] = int(re.findall(r'\b\d+\b', ld_json['recipeYield'])[0]) except Exception as e: print(e) - ld_json['servings'] = 1 for key in list(ld_json): if key not in [