From 47ed477cb09a9e6eb4a4b077785067f0fe9b23b0 Mon Sep 17 00:00:00 2001 From: Baris Can Durak Date: Mon, 16 Dec 2024 02:27:16 +0100 Subject: [PATCH] fixing the failures --- src/zenml/models/v2/core/artifact.py | 2 +- src/zenml/models/v2/core/model.py | 2 +- src/zenml/models/v2/core/pipeline.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/zenml/models/v2/core/artifact.py b/src/zenml/models/v2/core/artifact.py index bd87395b17..e36b602b6e 100644 --- a/src/zenml/models/v2/core/artifact.py +++ b/src/zenml/models/v2/core/artifact.py @@ -241,7 +241,7 @@ def apply_sorting( query = query.add_columns( latest_version_subquery.c.latest_version_created, - ) + ).where(ArtifactSchema.id == latest_version_subquery.c.id) # Apply sorting based on the operand if operand == SorterOps.ASCENDING: diff --git a/src/zenml/models/v2/core/model.py b/src/zenml/models/v2/core/model.py index 5669a9d223..bb341c1d5a 100644 --- a/src/zenml/models/v2/core/model.py +++ b/src/zenml/models/v2/core/model.py @@ -382,7 +382,7 @@ def apply_sorting( query = query.add_columns( latest_version_subquery.c.latest_version_created, - ) + ).where(ModelSchema.id == latest_version_subquery.c.id) # Apply sorting based on the operand if operand == SorterOps.ASCENDING: diff --git a/src/zenml/models/v2/core/pipeline.py b/src/zenml/models/v2/core/pipeline.py index 7cfd4109a9..43ea80dc7e 100644 --- a/src/zenml/models/v2/core/pipeline.py +++ b/src/zenml/models/v2/core/pipeline.py @@ -376,7 +376,7 @@ def apply_sorting( query = query.add_columns( latest_run_subquery.c.latest_run, - ) + ).where(PipelineSchema.id == latest_run_subquery.c.id) if operand == SorterOps.ASCENDING: query = query.order_by(