From 56f3fe2d123d92121937e29e85ddd91869f1067f Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Mon, 4 Apr 2022 19:27:14 +0200 Subject: [PATCH] fixed deprecated model attribute on exporters --- cookbook/integration/recipesage.py | 13 ++++++------- cookbook/integration/saffron.py | 7 +++---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/cookbook/integration/recipesage.py b/cookbook/integration/recipesage.py index d5292456f..29bf0eb4e 100644 --- a/cookbook/integration/recipesage.py +++ b/cookbook/integration/recipesage.py @@ -77,14 +77,13 @@ class RecipeSage(Integration): } for s in recipe.steps.all(): - if s.type != Step.TIME: - data['recipeInstructions'].append({ - '@type': 'HowToStep', - 'text': s.instruction - }) + data['recipeInstructions'].append({ + '@type': 'HowToStep', + 'text': s.instruction + }) - for i in s.ingredients.all(): - data['recipeIngredient'].append(f'{float(i.amount)} {i.unit} {i.food}') + for i in s.ingredients.all(): + data['recipeIngredient'].append(f'{float(i.amount)} {i.unit} {i.food}') return data diff --git a/cookbook/integration/saffron.py b/cookbook/integration/saffron.py index 0bfc4fbb3..a7ec34f10 100644 --- a/cookbook/integration/saffron.py +++ b/cookbook/integration/saffron.py @@ -71,11 +71,10 @@ class Saffron(Integration): recipeInstructions = [] recipeIngredient = [] for s in recipe.steps.all(): - if s.type != Step.TIME: - recipeInstructions.append(s.instruction) + recipeInstructions.append(s.instruction) - for i in s.ingredients.all(): - recipeIngredient.append(f'{float(i.amount)} {i.unit} {i.food}') + for i in s.ingredients.all(): + recipeIngredient.append(f'{float(i.amount)} {i.unit} {i.food}') data += "Ingredients: \n" for ingredient in recipeIngredient: