File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
services/web/server/src/simcore_service_webserver/projects Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 6161 ProjectNode ,
6262 ProjectNodeCreate ,
6363 ProjectNodesRepo ,
64+ make_workbench_subquery ,
6465)
6566from simcore_postgres_database .webserver_models import (
6667 ProjectType ,
@@ -451,10 +452,14 @@ def _create_shared_workspace_query(
451452 .group_by (workspaces_access_rights .c .workspace_id )
452453 ).subquery ("my_workspace_access_rights_subquery" )
453454
455+ workbench_subquery = make_workbench_subquery ()
456+
454457 shared_workspace_query = (
455458 sa .select (
456459 * PROJECT_DB_COLS ,
457- projects .c .workbench ,
460+ sa .func .coalesce (
461+ workbench_subquery .c .workbench , sa .text ("'{}'::json" )
462+ ).label ("workbench" ),
458463 projects_to_products .c .product_name ,
459464 projects_to_folders .c .folder_id ,
460465 )
@@ -473,6 +478,10 @@ def _create_shared_workspace_query(
473478 ),
474479 isouter = True ,
475480 )
481+ .outerjoin (
482+ workbench_subquery ,
483+ workbench_subquery .c .project_uuid == projects .c .uuid ,
484+ )
476485 )
477486 .where (projects_to_products .c .product_name == product_name )
478487 )
You can’t perform that action at this time.
0 commit comments