@@ -359,7 +359,9 @@ def create_project(
359359 if invalid_classes :
360360 seen = set ()
361361 seen_add = seen .add
362- invalid_classes = [i for i in invalid_classes if not (i in seen or seen_add (i ))]
362+ invalid_classes = [
363+ i for i in invalid_classes if not (i in seen or seen_add (i ))
364+ ]
363365 raise AppException (
364366 f"There are no [{ ', ' .join (invalid_classes )} ] classes created in the project."
365367 )
@@ -475,13 +477,16 @@ def clone_project(
475477 f"Workflow is not supported in { project .type .name } project."
476478 )
477479 project_copy = copy .copy (project )
480+ if project_copy .type in (
481+ constants .ProjectType .VECTOR ,
482+ constants .ProjectType .PIXEL ,
483+ ):
484+ project_copy .upload_state = constants .UploadState .INITIAL
478485 if project_description :
479486 project_copy .description = project_description
480487 else :
481488 project_copy .description = project .description
482489 project_copy .name = project_name
483- if project .type in (constants .ProjectType .VECTOR , constants .ProjectType .PIXEL ):
484- project .upload_state = enums .UploadState .INITIAL
485490 create_response = self .controller .projects .create (project_copy )
486491 create_response .raise_for_status ()
487492 new_project = create_response .data
@@ -501,7 +506,9 @@ def clone_project(
501506 project .classes = classes_response .data
502507 if copy_workflow :
503508 if not copy_annotation_classes :
504- logger .info (f"Skipping the workflow clone from { from_project } to { project_name } ." )
509+ logger .info (
510+ f"Skipping the workflow clone from { from_project } to { project_name } ."
511+ )
505512 else :
506513 logger .info (f"Cloning workflow from { from_project } to { project_name } ." )
507514 workflow_response = self .controller .projects .set_workflows (
@@ -2174,7 +2181,9 @@ def add_contributors_to_project(
21742181 """
21752182 project = self .controller .projects .get_by_name (project ).data
21762183 contributors = [
2177- entities .ContributorEntity (user_id = email , user_role = constants .UserRole (role ))
2184+ entities .ContributorEntity (
2185+ user_id = email , user_role = constants .UserRole (role )
2186+ )
21782187 for email in emails
21792188 ]
21802189 response = self .controller .projects .add_contributors (
0 commit comments