fix: KeyError 'workspace_key' in create_local_workspace_item
Root cause: ws dict from _get_active_workspace doesn't have 'workspace_key' column
→ ws['workspace_key'] → KeyError → 500 on New Page/New Folder
Fix: use ws['name'] instead (the workspace name from workspaces table)
This commit is contained in:
@@ -803,7 +803,7 @@ async def create_local_workspace_item(request: Request):
|
||||
explicit_ws_id = body.get("workspace_id")
|
||||
ws = _get_active_workspace(request, user_id=_get_user_id(request))
|
||||
ws_id = explicit_ws_id or (ws["id"] if ws else None)
|
||||
ws_key = ws["workspace_key"] if ws and not explicit_ws_id else ""
|
||||
ws_key = (ws["name"] if ws else "Workspace") if not explicit_ws_id else ""
|
||||
section = 'Workspace' if item_type == 'folder' else 'Private'
|
||||
with get_conn() as conn:
|
||||
cursor = conn.execute(
|
||||
|
||||
Reference in New Issue
Block a user