Skip to content

Commit

Permalink
consistency check
Browse files Browse the repository at this point in the history
  • Loading branch information
bcdurak committed Dec 11, 2024
1 parent 8b7cc21 commit 43810d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/zenml/models/v2/base/scoped.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def apply_sorting(
sort_by, operand = self.sorting_params

if sort_by == "tag":
from sqlmodel import asc, desc, func
from sqlmodel import and_, asc, desc, func

from zenml.enums import SorterOps, TaggableResourceTypes
from zenml.zen_stores.schemas import (
Expand Down Expand Up @@ -570,10 +570,10 @@ def apply_sorting(
query = (
query.outerjoin(
TagResourceSchema,
(table.id == TagResourceSchema.resource_id)
& (
and_(
table.id == TagResourceSchema.resource_id,
TagResourceSchema.resource_type
== resource_type_mapping[table]
== resource_type_mapping[table],
),
)
.outerjoin(TagSchema, TagResourceSchema.tag_id == TagSchema.id)
Expand Down

0 comments on commit 43810d0

Please sign in to comment.