[FIX] runbot_merge: bot info fetch

`r0` is still used afterwards as the response object, so don't
overwrite it when parsing the JSON body.
This commit is contained in:
Xavier Morel 2024-02-12 10:18:59 +01:00
parent 3a4fa494f8
commit 65c303a750

View File

@ -74,9 +74,9 @@ class Project(models.Model):
_logger.error("Failed to fetch merge bot information for project %s: %s", project.name, r0.text or r0.content)
continue
r0 = r0.json()
project.github_name = r0['name'] or r0['login']
if email := r0['email']:
r = r0.json()
project.github_name = r['name'] or r['login']
if email := r['email']:
project.github_email = email
continue