lots of importer adjustments

This commit is contained in:
vabene1111
2021-06-17 13:38:57 +02:00
parent 018fcf27ea
commit 151f43b0d5
18 changed files with 90 additions and 55 deletions

View File

@@ -143,7 +143,7 @@ def import_url(request):
)
step = Step.objects.create(
instruction=data['recipeInstructions'],
instruction=data['recipeInstructions'], space=request.space,
)
recipe.steps.add(step)
@@ -156,7 +156,7 @@ def import_url(request):
recipe.keywords.add(k)
for ing in data['recipeIngredient']:
ingredient = Ingredient()
ingredient = Ingredient(space=request.space,)
if ing['ingredient']['text'] != '':
ingredient.food, f_created = Food.objects.get_or_create(