Skip to content

Commit ea0191a

Browse files
hultoKCarretto
andauthored
Fix non-existent tag error (#684)
Co-authored-by: KCarretto <Kcarretto@gmail.com>
1 parent f8b340d commit ea0191a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

bin/ccdc-team-mappings/create_tags.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ def get_tag(self, tag_name):
6363
if 'errors' in res:
6464
return -1
6565
else:
66-
return res['data']['tags'][0]['id']
66+
if len(res['data']['tags']) > 0:
67+
return res['data']['tags'][0]['id']
68+
else:
69+
return -1
6770

6871
def create_tag(self, tag_name: str, tag_kind: str):
6972
print(f"{tag_name}:{tag_kind}")

0 commit comments

Comments
 (0)