From b7814bb942a57b126aa81067dbcc3feae736ad73 Mon Sep 17 00:00:00 2001 From: Pedro Crespo-Valero <32402063+pcrespov@users.noreply.github.com> Date: Mon, 4 Nov 2024 11:45:36 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Changing=20=3D=3D=20by=20i?= =?UTF-8?q?s=5F=20in=20sqlalchemy=20queries=20(#6654)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/maintenance/migrate_project/src/db.py | 4 ++-- .../simcore_service_webserver/studies_dispatcher/_catalog.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/maintenance/migrate_project/src/db.py b/scripts/maintenance/migrate_project/src/db.py index 6da7430a834..2d4fddfcd37 100644 --- a/scripts/maintenance/migrate_project/src/db.py +++ b/scripts/maintenance/migrate_project/src/db.py @@ -48,7 +48,7 @@ def _get_project(connection: Connection, project_uuid: UUID) -> ResultProxy: def _get_hidden_project(connection: Connection, prj_owner: int) -> ResultProxy: return connection.execute( select(projects).where( - and_(projects.c.prj_owner == prj_owner, projects.c.hidden == True) + and_(projects.c.prj_owner == prj_owner, projects.c.hidden.is_(True)) ) ) @@ -61,7 +61,7 @@ def _get_file_meta_data_without_soft_links( and_( file_meta_data.c.node_id == f"{node_uuid}", file_meta_data.c.project_id == f"{project_id}", - file_meta_data.c.is_soft_link != True, + file_meta_data.c.is_soft_link.is_not(True), ) ) ) diff --git a/services/web/server/src/simcore_service_webserver/studies_dispatcher/_catalog.py b/services/web/server/src/simcore_service_webserver/studies_dispatcher/_catalog.py index 3df62ebd379..b7144d6725b 100644 --- a/services/web/server/src/simcore_service_webserver/studies_dispatcher/_catalog.py +++ b/services/web/server/src/simcore_service_webserver/studies_dispatcher/_catalog.py @@ -97,7 +97,7 @@ async def iter_latest_product_services( ) & (services_meta_data.c.deprecated.is_(None)) & (services_access_rights.c.gid == EVERYONE_GROUP_ID) - & (services_access_rights.c.execute_access == True) + & (services_access_rights.c.execute_access.is_(True)) & (services_access_rights.c.product_name == product_name) ) ) @@ -161,7 +161,7 @@ async def validate_requested_service( sa.select(services_consume_filetypes.c.is_guest_allowed) .where( (services_consume_filetypes.c.service_key == service_key) - & (services_consume_filetypes.c.is_guest_allowed == True) + & (services_consume_filetypes.c.is_guest_allowed.is_(True)) ) .limit(1) )