Fix Project object subscript error in graph data endpoint

This commit is contained in:
_Yusaki 2026-03-13 19:26:55 +07:00
parent e14080129e
commit e806898018

View file

@ -541,9 +541,8 @@ def get_graph_data(graph_id: str):
try:
# Find which project owns this graph_id
all_projects = ProjectManager.list_projects()
for proj_summary in all_projects:
proj = ProjectManager.get_project(proj_summary["project_id"])
if proj and proj.graph_id == graph_id:
for proj in all_projects:
if proj.graph_id == graph_id:
project_dir = ProjectManager._get_project_dir(proj.project_id)
graph_data = LLMGraphBuilderService.load_graph_data(project_dir)
if graph_data: