fix: gitea get team id by name (#36)

This commit is contained in:
王梓宁520370910042 2024-07-23 16:25:10 +08:00 committed by GitHub
parent 6c11728dea
commit 0ed098fd1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,7 +64,7 @@ class Gitea:
@lru_cache()
def _get_team_id_by_name(self, name: str) -> int:
res = self.organization_api.team_search(self.org_name, q=str(name), limit=1)
res = self.organization_api.team_search(self.org_name, q=str(name), limit=1).to_dict()
if len(res["data"] or []) == 0:
raise Exception(
f"{name} not found by name in Gitea. Possible reason: you did not join this team."