mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
fixed recipe book entry remove
This commit is contained in:
@@ -148,13 +148,11 @@ def import_url(request):
|
||||
recipe.steps.add(step)
|
||||
|
||||
for kw in data['keywords']:
|
||||
# if k := Keyword.objects.filter(name=kw['text'], space=request.space).first():
|
||||
# recipe.keywords.add(k)
|
||||
# elif data['all_keywords']:
|
||||
# k = Keyword.objects.create(name=kw['text'], space=request.space)
|
||||
# recipe.keywords.add(k)
|
||||
k, created = Keyword.objects.get_or_create(name=kw['text'].strip(), space=request.space)
|
||||
recipe.keywords.add(k)
|
||||
if k := Keyword.objects.filter(name=kw['text'], space=request.space).first():
|
||||
recipe.keywords.add(k)
|
||||
elif data['all_keywords']:
|
||||
k = Keyword.objects.create(name=kw['text'], space=request.space)
|
||||
recipe.keywords.add(k)
|
||||
|
||||
for ing in data['recipeIngredient']:
|
||||
ingredient = Ingredient()
|
||||
|
||||
Reference in New Issue
Block a user