mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[FIX] runbot: fetch member should be able to access token for users
This commit is contained in:
parent
06f9f62b1f
commit
c9c64bccc7
@ -95,7 +95,7 @@ class RunbotTeam(models.Model):
|
|||||||
for team in self:
|
for team in self:
|
||||||
if team.github_team:
|
if team.github_team:
|
||||||
url = f"https://api.github.com/orgs/{team.organisation}/teams/{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)
|
response = session.get(url)
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
raise UserError(f'Cannot find team {team.github_team}')
|
raise UserError(f'Cannot find team {team.github_team}')
|
||||||
|
Loading…
Reference in New Issue
Block a user