From f11891eafa66378694c1d897dc4a96d8c23fb2ee Mon Sep 17 00:00:00 2001 From: anders-albert Date: Tue, 28 Nov 2023 18:27:35 +0100 Subject: [PATCH] fix: Bug in transformation init method --- CHANGELOG.md | 5 +++++ cognite/client/_version.py | 2 +- cognite/client/data_classes/transformations/__init__.py | 2 +- pyproject.toml | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2286e2c424..915ca7c346 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,11 @@ Changes are grouped as follows - `Fixed` for any bug fixes. - `Security` in case of vulnerabilities. +## [7.4.1] - 2023-11-28 +### Fixed +- Error in logic when creating a `Transformation`. This is causing when calling `client.transformations.update`. + This is now fixed. + ## [7.4.0] - 2023-11-27 ### Changed - Unit Catalog API is out of beta and will no longer issue warnings on usage. Access is unchanged: `client.units`. diff --git a/cognite/client/_version.py b/cognite/client/_version.py index 90ffdb3982..7aa8b64720 100644 --- a/cognite/client/_version.py +++ b/cognite/client/_version.py @@ -1,4 +1,4 @@ from __future__ import annotations -__version__ = "7.4.0" +__version__ = "7.4.1" __api_subversion__ = "V20220125" diff --git a/cognite/client/data_classes/transformations/__init__.py b/cognite/client/data_classes/transformations/__init__.py index b994334a95..31e2e5f682 100644 --- a/cognite/client/data_classes/transformations/__init__.py +++ b/cognite/client/data_classes/transformations/__init__.py @@ -186,7 +186,7 @@ def __init__( if ( (self.schedule and self.id != self.schedule.id) or (self.running_job and self.id != self.running_job.id) - or (self.last_finished_job and self.id != self.last_finished_job.id) + or (self.last_finished_job and self.id != self.last_finished_job.transformation_id) ): raise ValueError("Transformation id must be the same as the schedule, running_job, last_running_job id.") diff --git a/pyproject.toml b/pyproject.toml index 9927b5fe89..659efe0a0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "cognite-sdk" -version = "7.4.0" +version = "7.4.1" description = "Cognite Python SDK" readme = "README.md" documentation = "https://cognite-sdk-python.readthedocs-hosted.com"