Skip to content

Commit 8a074dd

Browse files
committed
list of project dict gets trashed_by_primary_gid
1 parent 9b743f5 commit 8a074dd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

services/web/server/src/simcore_service_webserver/projects/projects_service.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ async def get_project_for_user(
177177
user_id: UserID,
178178
*,
179179
include_state: bool | None = False,
180+
include_trashed_by_primary_gid: bool = False,
180181
check_permissions: str = "read",
181182
) -> ProjectDict:
182183
"""Returns a VALID project accessible to user
@@ -215,6 +216,13 @@ async def get_project_for_user(
215216
user_id, project, project_type is ProjectType.TEMPLATE, app
216217
)
217218

219+
if include_trashed_by_primary_gid and project.get("trashed_by") is not None:
220+
_values = await _projects_db.get_trashed_by_primary_gid_from_project(
221+
app, projects_uuids=[project["uuid"]]
222+
)
223+
assert len(_values) == 1
224+
project.update(trashed_by_primary_gid=_values[0])
225+
218226
if project["workspaceId"] is not None:
219227
workspace: UserWorkspaceWithAccessRights = (
220228
await workspaces_db.get_workspace_for_user(

0 commit comments

Comments
 (0)