Skip to content

Commit

Permalink
Fix non-existent tag error (#684)
Browse files Browse the repository at this point in the history
Co-authored-by: KCarretto <[email protected]>
  • Loading branch information
hulto and KCarretto authored Mar 2, 2024
1 parent f8b340d commit ea0191a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/ccdc-team-mappings/create_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ def get_tag(self, tag_name):
if 'errors' in res:
return -1
else:
return res['data']['tags'][0]['id']
if len(res['data']['tags']) > 0:
return res['data']['tags'][0]['id']
else:
return -1

def create_tag(self, tag_name: str, tag_kind: str):
print(f"{tag_name}:{tag_kind}")
Expand Down

0 comments on commit ea0191a

Please sign in to comment.