Skip to content

Commit ea70b93

Browse files
committed
Fix get_annotations from empty folder
1 parent bbf45c5 commit ea70b93

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/superannotate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
import sys
33

4-
__version__ = "4.4.4dev5"
4+
__version__ = "4.4.4dev6"
55

66
sys.path.append(os.path.split(os.path.realpath(__file__))[0])
77

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,10 @@ async def run_workers(self, big_annotations, small_annotations):
833833
def execute(self):
834834
if self.is_valid():
835835
items_count = len(self._item_names)
836+
if not items_count:
837+
self.reporter.log_info("No annotations to download.")
838+
self._response.data = []
839+
return self._response
836840
self.reporter.log_info(
837841
f"Getting {items_count} annotations from "
838842
f"{self._project.name}{f'/{self._folder.name}' if self._folder.name != 'root' else ''}."

0 commit comments

Comments
 (0)