Skip to content

Commit a40b3a4

Browse files
authored
Merge pull request #526 from superannotateai/1289_download_image
checking for 'id' only if attribute has one, else leave name as is
2 parents 9a86a73 + 547a1db commit a40b3a4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,15 +1593,14 @@ def fill_classes_data(self, annotations: dict):
15931593
attribute["groupName"] = annotation_class["attribute_groups"][
15941594
attribute["groupId"]
15951595
]["name"]
1596-
if attribute["id"] not in list(
1596+
if attribute.get("id") in list(
15971597
annotation_class["attribute_groups"][attribute["groupId"]][
15981598
"attributes"
15991599
].keys()
16001600
):
1601-
continue
1602-
attribute["name"] = annotation_class["attribute_groups"][
1603-
attribute["groupId"]
1604-
]["attributes"][attribute["id"]]
1601+
attribute["name"] = annotation_class["attribute_groups"][
1602+
attribute["groupId"]
1603+
]["attributes"][attribute["id"]]
16051604

16061605
def execute(self):
16071606
if self.is_valid():

0 commit comments

Comments
 (0)