Skip to content

fix(api): remove duplicate to_dict() in /api/graph/tasks — crashes every request#305

Open
warren618 wants to merge 1 commit into666ghj:mainfrom
warren618:fix/tasks-endpoint-crash
Open

fix(api): remove duplicate to_dict() in /api/graph/tasks — crashes every request#305
warren618 wants to merge 1 commit into666ghj:mainfrom
warren618:fix/tasks-endpoint-crash

Conversation

@warren618
Copy link
Copy Markdown

Summary

Fixes #304

TaskManager.list_tasks() already returns dicts. The endpoint called .to_dict() again on plain dicts → AttributeError on every request.

Fix

- "data": [t.to_dict() for t in tasks],
+ "data": tasks,

One line, one file.

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.
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Mar 22, 2026
mohamedsorour1998 added a commit to mohamedsorour1998/MiroFish that referenced this pull request Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: GET /api/graph/tasks crashes with AttributeError on every request

1 participant