diff --git a/src/backend/api/routers/tasks.py b/src/backend/api/routers/tasks.py index b682fb7..501dbba 100644 --- a/src/backend/api/routers/tasks.py +++ b/src/backend/api/routers/tasks.py @@ -223,7 +223,10 @@ async def reorder_tasks( result = await db.execute( select(RecipeTask) .where(RecipeTask.id.in_(data.task_ids)) - .options(selectinload(RecipeTask.subtasks)) + .options( + selectinload(RecipeTask.subtasks), + selectinload(RecipeTask.version), + ) ) tasks_map = {t.id: t for t in result.scalars().all()}