fixed url_import
This commit is contained in:
@ -23,7 +23,8 @@ class Mealie(Integration):
|
|||||||
name=recipe_json['name'].strip(), description=description,
|
name=recipe_json['name'].strip(), description=description,
|
||||||
created_by=self.request.user, internal=True, space=self.request.space)
|
created_by=self.request.user, internal=True, space=self.request.space)
|
||||||
|
|
||||||
# TODO parse times (given in PT2H3M )
|
# TODO parse times (given in PT2H3M )
|
||||||
|
# @vabene check recipe_url_import.iso_duration_to_minutes I think it does what you are looking for
|
||||||
|
|
||||||
ingredients_added = False
|
ingredients_added = False
|
||||||
for s in recipe_json['recipe_instructions']:
|
for s in recipe_json['recipe_instructions']:
|
||||||
|
@ -25,6 +25,7 @@ class NextcloudCookbook(Integration):
|
|||||||
servings=recipe_json['recipeYield'], space=self.request.space)
|
servings=recipe_json['recipeYield'], space=self.request.space)
|
||||||
|
|
||||||
# TODO parse times (given in PT2H3M )
|
# TODO parse times (given in PT2H3M )
|
||||||
|
# @vabene check recipe_url_import.iso_duration_to_minutes I think it does what you are looking for
|
||||||
# TODO parse keywords
|
# TODO parse keywords
|
||||||
|
|
||||||
ingredients_added = False
|
ingredients_added = False
|
||||||
|
@ -149,7 +149,7 @@ def import_url(request):
|
|||||||
recipe.steps.add(step)
|
recipe.steps.add(step)
|
||||||
|
|
||||||
for kw in data['keywords']:
|
for kw in data['keywords']:
|
||||||
k = Keyword.objects.get_or_create(name=kw['text'], space=request.space)
|
k, created = Keyword.objects.get_or_create(name=kw['text'], space=request.space)
|
||||||
recipe.keywords.add(k)
|
recipe.keywords.add(k)
|
||||||
|
|
||||||
for ing in data['recipeIngredient']:
|
for ing in data['recipeIngredient']:
|
||||||
|
Reference in New Issue
Block a user