Skip to content

Commit

Permalink
Added: handling of no_label_annotation_set (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
iftwigs authored Aug 8, 2024
1 parent 8950d86 commit e657f44
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions konfuzio_sdk/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3137,14 +3137,17 @@ def no_label_annotation_set(self) -> AnnotationSet:
self.annotation_sets()

# Find no label annotation set
self._no_label_annotation_set = next(
(
annotation_set
for annotation_set in self._annotation_sets
if annotation_set.label_set == self.project.no_label_set
),
None,
)
if self._annotation_sets is not None:
self._no_label_annotation_set = next(
(
annotation_set
for annotation_set in self._annotation_sets
if annotation_set.label_set == self.project.no_label_set
),
None,
)
else:
self._no_label_annotation_set = None

# Create no label annotation set if not found
if self._no_label_annotation_set is None:
Expand Down

0 comments on commit e657f44

Please sign in to comment.