File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
services/web/server/src/simcore_service_webserver/projects Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1565,6 +1565,17 @@ async def try_open_project_for_user(
15651565 )
15661566 async def _open_project () -> bool :
15671567 with managed_resource (user_id , client_session_id , app ) as user_session :
1568+ # check if the project is already opened
1569+ if (
1570+ current_project_ids := await user_session .find (PROJECT_ID_KEY )
1571+ ) and current_project_ids == [f"{ project_uuid } " ]:
1572+ _logger .debug (
1573+ "project %s is already opened by user %s/%s" ,
1574+ project_uuid ,
1575+ user_id ,
1576+ client_session_id ,
1577+ )
1578+ return True
15681579 # Enforce per-user open project limit
15691580 if max_number_of_opened_projects_per_user is not None and (
15701581 len (
@@ -1585,7 +1596,7 @@ async def _open_project() -> bool:
15851596 client_session_id = client_session_id ,
15861597 )
15871598
1588- # Assign project_id to current_session
1599+ # try to assign project_id to current_session
15891600 sessions_with_project = await user_session .find_users_of_resource (
15901601 app , PROJECT_ID_KEY , f"{ project_uuid } "
15911602 )
You can’t perform that action at this time.
0 commit comments