Skip to content

Commit ba32c2e

Browse files
committed
Fix return values
1 parent 5620618 commit ba32c2e

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,7 @@ def upload_videos_from_folder_to_project(
14631463
)
14641464
if response.errors:
14651465
raise AppException(response.errors)
1466-
return response.data.values
1466+
return response.data
14671467

14681468

14691469
@Trackable
@@ -1516,7 +1516,7 @@ def upload_video_to_project(
15161516
)
15171517
if response.errors:
15181518
raise AppException(response.errors)
1519-
return response.data.get(str(video_path), [])
1519+
return response.data
15201520

15211521

15221522
@Trackable

src/superannotate/lib/core/usecases/images.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3184,7 +3184,7 @@ def validate_paths(self):
31843184

31853185
def execute(self) -> Response:
31863186
if self.is_valid():
3187-
data = {}
3187+
data = []
31883188
for path in self._paths:
31893189
with tempfile.TemporaryDirectory() as temp_path:
31903190
frame_names = VideoPlugin.get_extractable_frames(
@@ -3269,9 +3269,6 @@ def execute(self) -> Response:
32693269
os.remove(image_path)
32703270
else:
32713271
raise AppException(use_case.response.errors)
3272-
3273-
3274-
3275-
data[str(path)] = uploaded_paths
3272+
data.extend(uploaded_paths)
32763273
self._response.data = data
32773274
return self._response

0 commit comments

Comments
 (0)