From c9c64bccc7cd18dc7ae164af947105a27cce70e2 Mon Sep 17 00:00:00 2001 From: Xavier-Do Date: Wed, 11 Jan 2023 13:35:02 +0100 Subject: [PATCH] [FIX] runbot: fetch member should be able to access token for users --- runbot/models/team.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runbot/models/team.py b/runbot/models/team.py index f490367d..6e1e2387 100644 --- a/runbot/models/team.py +++ b/runbot/models/team.py @@ -95,7 +95,7 @@ class RunbotTeam(models.Model): for team in self: if team.github_team: url = f"https://api.github.com/orgs/{team.organisation}/teams/{team.github_team}" - session = _make_github_session(team.project_id.token) + session = _make_github_session(team.project_id.sudo().token) response = session.get(url) if response.status_code != 200: raise UserError(f'Cannot find team {team.github_team}')