Skip to content

Commit

Permalink
fix: Wrong check of boolean column
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine committed Nov 11, 2024
1 parent c94c0fc commit 93ee7e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ai/backend/manager/models/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
& (
Expand Down

0 comments on commit 93ee7e1

Please sign in to comment.