From 0ed098fd1d257c508706a10d2a7982b0f503388b Mon Sep 17 00:00:00 2001 From: wznmickey Date: Tue, 23 Jul 2024 16:25:10 +0800 Subject: [PATCH] fix: gitea get team id by name (#36) --- joint_teapot/workers/gitea.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/joint_teapot/workers/gitea.py b/joint_teapot/workers/gitea.py index f2ea965..95f594b 100644 --- a/joint_teapot/workers/gitea.py +++ b/joint_teapot/workers/gitea.py @@ -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."