From 777f4518be16a180b13ff012a1d5f12c6d6e3d0d Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Mon, 15 Feb 2021 15:16:15 +0100 Subject: [PATCH] servings default to 1 on import --- 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 bb7ec81e..0ff4f1c9 100644 --- a/cookbook/helper/recipe_url_import.py +++ b/cookbook/helper/recipe_url_import.py @@ -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 [