fix(library): SQL workspace — (workspace != '' OR workspace_id IS NOT NULL)
Les pages du workspace local ont workspace='' mais workspace_id=27. Le filtre workspace != '' les excluait, retournant 0 items. Ajout de OR workspace_id IS NOT NULL pour inclure les pages locales. Simplification du frontend: le workspace tab appelle l'API standard avec workspace_id.
This commit is contained in:
@@ -445,7 +445,7 @@ async def library_workspace(
|
||||
source_type = "all"
|
||||
|
||||
uid = _get_user_id(request)
|
||||
query = f"{BASE_SELECT} FROM pages p WHERE p.workspace != '' AND p.parent_section != 'Trash' AND p.deleted_at IS NULL"
|
||||
query = f"{BASE_SELECT} FROM pages p WHERE (p.workspace != '' OR p.workspace_id IS NOT NULL) AND p.parent_section != 'Trash' AND p.deleted_at IS NULL"
|
||||
params: list = []
|
||||
|
||||
if workspace_id:
|
||||
|
||||
Reference in New Issue
Block a user