fix: 500 error on /pages/{id} — missing page_share_mode in dashboard.py
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

dashboard.router is registered before board.router in main.py, so its
/pages/{page_id} takes priority. It was missing page_share_mode and
page_published template variables, causing Jinja2 TypeError.
This commit is contained in:
2026-07-10 13:02:53 -04:00
parent 6033a0b1e4
commit f7d9d91723
+4 -1
View File
@@ -166,7 +166,10 @@ async def view_page_root(request: Request, page_id: int):
"SELECT id, title FROM pages WHERE parent_id=? ORDER BY updated_at DESC",
(page_id,),
).fetchall()
ctx = {**sidebar, "page": page, "sub_pages": [dict(s) for s in subs], "page_favorited": False}
ctx = {**sidebar, "page": page, "sub_pages": [dict(s) for s in subs],
"page_favorited": False,
"page_share_mode": page.get("share_mode", "private"),
"page_published": bool(page.get("published", 0))}
template = env.get_template("page_editor.html")
return template.render(**ctx)