From 07918cddd6ae0f94dc8ad43a2ff447cc53713d95 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 30 Jul 2020 09:14:15 +0200 Subject: [PATCH] [FIX] runbot_merge: incorrect attribute access Seems to be a pretty long-standing issue but I'd not noticed it before as it's rather rarely taken & our sentry remains rather blown to hell, I only happened to stumble upon the issue in the logs. There's no ``number`` attribute on the repository object (to which ``_load_pr`` belongs). We obviously want to use the number of the PR we're currently loading. --- runbot_merge/models/pull_requests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runbot_merge/models/pull_requests.py b/runbot_merge/models/pull_requests.py index 8d3524d7..e19f19a4 100644 --- a/runbot_merge/models/pull_requests.py +++ b/runbot_merge/models/pull_requests.py @@ -309,7 +309,7 @@ All substitutions are tentatively applied sequentially to the input. }) self.env['runbot_merge.pull_requests.feedback'].create({ 'repository': pr_id.repository.id, - 'pull_request': self.number, + 'pull_request': number, 'message': r, }) return