Skip to content

Commit 470fbab

Browse files
Fixes SQL filtering for conversation type matching
Replaces use of 'in' operator with SQLAlchemy's 'in_' method to ensure correct filtering of conversation types in queries. Prevents potential logical errors and improves query reliability.
1 parent 877e4df commit 470fbab

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

services/web/server/src/simcore_service_webserver/conversations/_conversation_repository.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,12 @@ async def list_project_conversations(
8181
.where(
8282
(conversations.c.project_uuid == f"{project_uuid}")
8383
& (
84-
conversations.c.type
85-
in [
86-
ConversationType.PROJECT_STATIC,
87-
ConversationType.PROJECT_ANNOTATION,
88-
]
84+
conversations.c.type.in_(
85+
(
86+
ConversationType.PROJECT_STATIC,
87+
ConversationType.PROJECT_ANNOTATION,
88+
)
89+
)
8990
)
9091
)
9192
)

0 commit comments

Comments
 (0)