demo seed change 4
This commit is contained in:
@@ -188,6 +188,9 @@ async def clone_demo_data(
|
||||
"recipe_ingredients": 0
|
||||
}
|
||||
|
||||
# First, build recipe ID map by processing all recipes
|
||||
recipe_id_map = {}
|
||||
|
||||
# Create Recipes
|
||||
for recipe_data in seed_data.get('recipes', []):
|
||||
# Transform recipe ID using XOR
|
||||
@@ -263,8 +266,8 @@ async def clone_demo_data(
|
||||
db.add(new_recipe)
|
||||
stats["recipes"] += 1
|
||||
|
||||
# Map recipe ID for ingredients
|
||||
recipe_id_map = {recipe_data['id']: str(transformed_id)}
|
||||
# Add recipe ID to map for ingredients
|
||||
recipe_id_map[recipe_data['id']] = str(transformed_id)
|
||||
|
||||
# Create Recipe Ingredients
|
||||
for recipe_ingredient_data in seed_data.get('recipe_ingredients', []):
|
||||
|
||||
Reference in New Issue
Block a user