Skip to content

Commit 72d3c23

Browse files
committed
Changed validation in SetAnnotationStatues
1 parent 2d0f794 commit 72d3c23

File tree

1 file changed

+5
-5
lines changed
  • src/superannotate/lib/core/usecases

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -658,16 +658,16 @@ def validate_items(self):
658658
existing_items = []
659659
for i in range(0, len(self._item_names), self.CHUNK_SIZE):
660660
search_names = self._item_names[i : i + self.CHUNK_SIZE] # noqa
661-
cand_items = self._service_provider.items.list_by_names(
661+
response = self._service_provider.items.list_by_names(
662662
project=self._project,
663663
folder=self._folder,
664664
names=search_names,
665-
).data
665+
)
666+
if not response.ok:
667+
raise AppValidationException(response.error)
666668

667-
if isinstance(cand_items, dict):
668-
continue
669+
cand_items = response.data
669670
existing_items += cand_items
670-
671671
if not existing_items:
672672
raise AppValidationException(self.ERROR_MESSAGE)
673673
if existing_items:

0 commit comments

Comments
 (0)