diff --git a/loopx/chat_manager_details.py b/loopx/chat_manager_details.py index 2f2430fecc..6fe09b6c57 100644 --- a/loopx/chat_manager_details.py +++ b/loopx/chat_manager_details.py @@ -43,7 +43,11 @@ def read_manager_goal_details( ) if result.get("ok") is not True: raise ValueError("Todo authority unavailable or conflicting") - records = ([result["todo"]] if result.get("todo") else []) if todo_id else result.get("todos", []) + records = ( + ([result["todo"]] if result.get("todo") else result.get("todos", [])) + if todo_id + else result.get("todos", []) + ) page = effect_runtime_result("todo.context.page", { "records": records, "owner_scope": owner_scope, "offset": offset, "limit": limit, "todo_id": todo_id,