Skip to content

Commit

Permalink
fix: use projects resolver to check for data connections
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas1312 committed Oct 5, 2023
1 parent e3cea8e commit ee43345
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kili/services/copy_project/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down Expand Up @@ -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"])
Expand Down

0 comments on commit ee43345

Please sign in to comment.