Skip to content

Commit 7c308bf

Browse files
Matus DrobuliakMatus Drobuliak
authored andcommitted
work
1 parent 17a8abf commit 7c308bf

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

services/web/server/src/simcore_service_webserver/projects/_controller/projects_rest_schemas.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Annotated, Self
1+
from typing import Annotated, Literal, Self
22

33
from models_library.basic_types import IDStr
44
from models_library.folders import FolderID
@@ -118,6 +118,12 @@ class ProjectFilters(Filters):
118118
description="A search query to filter projects with associated job_parent_resource_name",
119119
),
120120
] = None
121+
template_type: Annotated[
122+
Literal["TEMPLATE", "HYPERTOOL", "TUTORIAL"] | None,
123+
Field(
124+
description="A search query to filter projects with associated job_parent_resource_name",
125+
),
126+
] = None
121127

122128

123129
ProjectsListOrderParams = create_ordering_query_model_class(

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ async def list_projects( # pylint: disable=too-many-arguments
148148
),
149149
# attrs
150150
filter_by_project_type=ProjectTypeAPI.to_project_type_db(project_type),
151+
filter_by_template_type=None,
151152
filter_by_services=user_available_services,
152153
filter_trashed=trashed,
153154
filter_hidden=show_hidden,

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,9 @@ async def list_projects_dicts( # pylint: disable=too-many-arguments,too-many-st
660660
# order
661661
order_by: OrderBy = DEFAULT_ORDER_BY,
662662
) -> tuple[list[ProjectDict], list[ProjectType], int]:
663+
664+
# Check compatibility of project type and template type
665+
663666
async with self.engine.acquire() as conn:
664667
user_groups_proxy: list[RowProxy] = await self._list_user_groups(
665668
conn, user_id

0 commit comments

Comments
 (0)