From c5a056d53f2183a45294ff6d68f76ea96f33ab44 Mon Sep 17 00:00:00 2001 From: Gyubong Lee Date: Mon, 11 Nov 2024 02:57:29 +0000 Subject: [PATCH] fix: Wrong check of boolean column --- src/ai/backend/manager/models/image.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ai/backend/manager/models/image.py b/src/ai/backend/manager/models/image.py index d66fa677d2d..f412d4fc5a0 100644 --- a/src/ai/backend/manager/models/image.py +++ b/src/ai/backend/manager/models/image.py @@ -24,6 +24,7 @@ import trafaret as t from sqlalchemy.ext.asyncio import AsyncConnection, AsyncSession from sqlalchemy.orm import joinedload, load_only, relationship, selectinload +from sqlalchemy.sql.expression import false, true from ai.backend.common.docker import ImageRef from ai.backend.common.etcd import AsyncEtcd @@ -789,9 +790,9 @@ async def _in_project_scope( ) .where( sa.or_( - ContainerRegistryRow.is_global, + ContainerRegistryRow.is_global == true(), sa.and_( - not ContainerRegistryRow.is_global, + ContainerRegistryRow.is_global == false(), sa.exists().where( (AssociationContainerRegistriesGroupsRow.group_id == scope.project_id) & (