From 32fa3c898755a63d661aa776fa699a4c034721d4 Mon Sep 17 00:00:00 2001 From: warren618 Date: Mon, 23 Mar 2026 02:47:53 +0800 Subject: [PATCH] fix(api): remove duplicate to_dict() call in /api/graph/tasks TaskManager.list_tasks() already returns a list of dicts (it calls t.to_dict() internally at task.py:170). The endpoint then called .to_dict() again on these plain dicts, raising AttributeError on every request to GET /api/graph/tasks. --- backend/app/api/graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/api/graph.py b/backend/app/api/graph.py index 12ff1ba2..378ae75b 100644 --- a/backend/app/api/graph.py +++ b/backend/app/api/graph.py @@ -554,7 +554,7 @@ def list_tasks(): return jsonify({ "success": True, - "data": [t.to_dict() for t in tasks], + "data": tasks, "count": len(tasks) })