From 68e6ab4be5f7992de6438a6f0693228e23e20cb7 Mon Sep 17 00:00:00 2001 From: ellezhu1 Date: Sun, 21 Apr 2024 08:31:29 +0000 Subject: [PATCH] get step name --- cookbook/integration/nextcloud_cookbook.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cookbook/integration/nextcloud_cookbook.py b/cookbook/integration/nextcloud_cookbook.py index 4357c509b..303e40855 100644 --- a/cookbook/integration/nextcloud_cookbook.py +++ b/cookbook/integration/nextcloud_cookbook.py @@ -60,6 +60,11 @@ class NextcloudCookbook(Integration): step = Step.objects.create( instruction=s, space=self.request.space, show_ingredients_table=self.request.user.userpreference.show_step_ingredients, ) + step.name = re.search(r'(\w+):\\n', s) + + + + if not ingredients_added: if len(recipe_json['description'].strip()) > 500: step.instruction = recipe_json['description'].strip() + '\n\n' + step.instruction