diff --git a/bin/ccdc-team-mappings/create_tags.py b/bin/ccdc-team-mappings/create_tags.py index 5e86c7e7a..2512b270c 100644 --- a/bin/ccdc-team-mappings/create_tags.py +++ b/bin/ccdc-team-mappings/create_tags.py @@ -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}")