From 65c303a750ab21906c98a3ee3aa8f77e7f83c984 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 12 Feb 2024 10:18:59 +0100 Subject: [PATCH] [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. --- runbot_merge/models/project.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runbot_merge/models/project.py b/runbot_merge/models/project.py index 57fc1a33..b686137c 100644 --- a/runbot_merge/models/project.py +++ b/runbot_merge/models/project.py @@ -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