From 3363a070cf540c520805471e771c1758ef5f7f1c Mon Sep 17 00:00:00 2001 From: bruno Date: Fri, 10 Jul 2026 20:27:33 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20tree=20API=20500=20=E2=80=94=20missing?= =?UTF-8?q?=20parent=5Fsection=20in=20SELECT=20query?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The roots query only had id, title columns but the tree builder accessed r['parent_section'] which didn't exist in the result row. Added parent_section to the SELECT to fix folder type detection. --- app/routers/dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routers/dashboard.py b/app/routers/dashboard.py index 690cebb..345e447 100644 --- a/app/routers/dashboard.py +++ b/app/routers/dashboard.py @@ -521,7 +521,7 @@ async def local_workspace_tree(request: Request): ws_id = ws["id"] if ws else None with get_conn() as conn: roots = conn.execute( - "SELECT id, title FROM pages WHERE parent_id IS NULL AND workspace_id=? ORDER BY created_at DESC", + "SELECT id, title, parent_section FROM pages WHERE parent_id IS NULL AND workspace_id=? ORDER BY created_at DESC", (ws_id,), ).fetchall() if ws_id else [] tree = []