fix: tree API 500 — missing parent_section in SELECT query
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

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.
This commit is contained in:
2026-07-10 20:27:33 -04:00
parent 0c54db66ac
commit 3363a070cf
+1 -1
View File
@@ -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 = []