fixed nextcloiud importer
This commit is contained in:
@ -41,9 +41,9 @@ class NextcloudCookbook(Integration):
|
|||||||
|
|
||||||
ingredient_parser = IngredientParser(self.request, True)
|
ingredient_parser = IngredientParser(self.request, True)
|
||||||
for ingredient in recipe_json['recipeIngredient']:
|
for ingredient in recipe_json['recipeIngredient']:
|
||||||
amount, unit, ingredient, note = parse(ingredient)
|
amount, unit, ingredient, note = ingredient_parser.parse(ingredient)
|
||||||
f = get_food(ingredient, self.request.space)
|
f = ingredient_parser.get_food(ingredient)
|
||||||
u = get_unit(unit, self.request.space)
|
u = ingredient_parser.get_unit(unit)
|
||||||
step.ingredients.add(Ingredient.objects.create(
|
step.ingredients.add(Ingredient.objects.create(
|
||||||
food=f, unit=u, amount=amount, note=note, space=self.request.space,
|
food=f, unit=u, amount=amount, note=note, space=self.request.space,
|
||||||
))
|
))
|
||||||
|
Reference in New Issue
Block a user