From 4933726b79395c415fd7c71af5bcc7bd4d24eb1b Mon Sep 17 00:00:00 2001 From: ellezhu1 Date: Sun, 21 Apr 2024 21:23:40 +0000 Subject: [PATCH] made some changes --- cookbook/integration/nextcloud_cookbook.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cookbook/integration/nextcloud_cookbook.py b/cookbook/integration/nextcloud_cookbook.py index c065ed7c3..1520e9014 100644 --- a/cookbook/integration/nextcloud_cookbook.py +++ b/cookbook/integration/nextcloud_cookbook.py @@ -65,7 +65,10 @@ class NextcloudCookbook(Integration): if ingredients_added == False: for ingredient in recipe_json['recipeIngredient']: ingredients_added = True - if ingredient.find('##') == -1: + if ingredient.startswith('##'): + subheader = ingredient.replace('##', '', 1) + step.ingredients.add(Ingredient.objects.create(note=subheader, is_header=True, no_amount=True, space=self.request.space)) + else: amount, unit, food, note = ingredient_parser.parse(ingredient) f = ingredient_parser.get_food(food) u = ingredient_parser.get_unit(unit)