Skip to content

Commit fe70a1d

Browse files
committed
fix convertor
1 parent 118727b commit fe70a1d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,10 @@ def __init__(
592592

593593
def validate_project_type(self):
594594
if self._project.project_type != constances.ProjectType.VIDEO.value:
595-
raise AppException("The function only supports video projects.")
595+
raise AppException(
596+
"The function is not supported for"
597+
f" {constances.ProjectType.get_name(self._project.project_type)} projects."
598+
)
596599

597600
def execute(self):
598601
self.reporter.disable_info()

src/superannotate/lib/core/video_convertor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,11 @@ def get_median(self, annotations: List[dict]) -> dict:
112112
median_annotation = annotation
113113
return median_annotation
114114

115-
def merge_first_frame(self, frames_mapping):
115+
@staticmethod
116+
def merge_first_frame(frames_mapping):
116117
try:
117118
if 0 in frames_mapping:
118-
frames_mapping[1].extend(frames_mapping[0])
119+
frames_mapping[1].extendleft(frames_mapping[0])
119120
del frames_mapping[0]
120121
finally:
121122
return frames_mapping

0 commit comments

Comments
 (0)