Skip to content

Commit 1d5223f

Browse files
authored
Merge pull request #228 from superannotateai/sdk_project_paths
Sdk project paths
2 parents a3f4a53 + bab509c commit 1d5223f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/superannotate/lib/app/interface/sdk_interface.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -671,8 +671,9 @@ def copy_images(
671671

672672
project_name, source_folder_name = extract_project_folder(source_project)
673673

674-
_, destination_folder_name = extract_project_folder(destination_project)
675-
674+
to_project_name, destination_folder_name = extract_project_folder(destination_project)
675+
if project_name != to_project_name:
676+
raise AppException("Source and destination projects should be the same for copy_images")
676677
if not image_names:
677678
images = controller.search_images(
678679
project_name=project_name, folder_path=source_folder_name
@@ -734,7 +735,10 @@ def move_images(
734735
]:
735736
raise AppException(LIMITED_FUNCTIONS[project["project"].project_type])
736737

737-
_, destination_folder_name = extract_project_folder(destination_project)
738+
to_project_name, destination_folder_name = extract_project_folder(destination_project)
739+
740+
if project_name != to_project_name:
741+
raise AppException("Source and destination projects should be the same for move_images")
738742

739743
if not image_names:
740744
images = controller.search_images(

src/superannotate/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
__version__ = "5.0.0b40"
2+

0 commit comments

Comments
 (0)