From ee43345c4f8601f064b87c7a086c6dee07630e78 Mon Sep 17 00:00:00 2001 From: Jonas Maison Date: Thu, 5 Oct 2023 12:59:50 +0200 Subject: [PATCH] fix: use projects resolver to check for data connections --- src/kili/services/copy_project/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kili/services/copy_project/__init__.py b/src/kili/services/copy_project/__init__.py index a89d69ae2..4a33f42e7 100644 --- a/src/kili/services/copy_project/__init__.py +++ b/src/kili/services/copy_project/__init__.py @@ -26,7 +26,7 @@ class ProjectCopier: # pylint: disable=too-few-public-methods "inputType", "description", "id", - "dataConnections.dataIntegrationId", + "dataConnections.id", ) FIELDS_JSON_INTERFACE = ("jsonInterface",) FIELDS_QUALITY_SETTINGS = ( @@ -87,7 +87,7 @@ def copy_project( # pylint: disable=too-many-arguments,too-many-locals src_project = get_project(self.kili, from_project_id, fields) - if len(src_project["dataConnections"]) > 0 and copy_assets: + if src_project["dataConnections"] and copy_assets: raise NotImplementedError("Copying projects with cloud storage is not supported.") new_project_title = title or self._generate_project_title(src_title=src_project["title"])