Skip to content

Commit

Permalink
@matusdrobuliak66 review: add fix to project
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Jan 7, 2025
1 parent c76e21a commit f5c523a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions services/web/server/src/simcore_service_webserver/projects/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,13 +529,7 @@ async def list_projects( # pylint: disable=too-many-arguments,too-many-statemen
None
) # <-- All shared workspaces
)
if filter_by_text is not None:
shared_workspace_query = shared_workspace_query.join(
users, users.c.id == projects.c.prj_owner, isouter=True
)

else:
# FIXME: PC: Aks Matus why test_trash_project_in_subfolder fails here!
assert ( # nosec
workspace_query.workspace_scope == WorkspaceScope.SHARED
)
Expand All @@ -544,6 +538,12 @@ async def list_projects( # pylint: disable=too-many-arguments,too-many-statemen
== workspace_query.workspace_id # <-- Specific shared workspace
)

if filter_by_text is not None:
# NOTE: fields searched with text include user's email
shared_workspace_query = shared_workspace_query.join(
users, users.c.id == projects.c.prj_owner, isouter=True
)

else:
shared_workspace_query = None

Expand Down
2 changes: 1 addition & 1 deletion services/web/server/tests/unit/with_dbs/03/test_trash.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ async def test_trash_project_in_subfolder(
)
data, _ = await assert_status(resp, status.HTTP_200_OK)
assert len(data) == 1
assert data[0]["uuid"] == project_uuid
assert data[0]["uuid"] == f"{project_uuid}"

# UNTRASH
resp = await client.post(f"/v0/projects/{project_uuid}:untrash")
Expand Down

0 comments on commit f5c523a

Please sign in to comment.