return steps in importer

This commit is contained in:
vabene1111
2025-09-23 07:41:11 +02:00
parent a81bc335cc
commit e562883da3

View File

@@ -155,7 +155,7 @@ def get_from_scraper(scrape, request):
# assign steps # assign steps
try: try:
for i in parse_instructions(scrape.instructions()): for i in parse_instructions(scrape.instructions_list()):
recipe_json['steps'].append({ recipe_json['steps'].append({
'instruction': i, 'instruction': i,
'ingredients': [], 'ingredients': [],
@@ -177,11 +177,11 @@ def get_from_scraper(scrape, request):
for x in scrape.ingredients(): for x in scrape.ingredients():
if x.strip() != '': if x.strip() != '':
try: try:
amount, unit, ingredient, note = ingredient_parser.parse(x) amount, unit, food, note = ingredient_parser.parse(x)
ingredient = { ingredient = {
'amount': amount, 'amount': amount,
'food': { 'food': {
'name': ingredient, 'name': food,
}, },
'unit': None, 'unit': None,
'note': note, 'note': note,