mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[FIX] runbot_merge: possibly missing commit object in try_splitting
Would trigger a TypeError when trying to json.loads(False).
This commit is contained in:
parent
eb91e2371b
commit
c9f9b3050b
@ -1278,7 +1278,7 @@ class Stagings(models.Model):
|
|||||||
commit = self.env['runbot_merge.commit'].search([
|
commit = self.env['runbot_merge.commit'].search([
|
||||||
('sha', '=', head)
|
('sha', '=', head)
|
||||||
])
|
])
|
||||||
statuses = json.loads(commit.statuses)
|
statuses = json.loads(commit.statuses or '{}')
|
||||||
reason = next((
|
reason = next((
|
||||||
ctx for ctx, result in statuses.items()
|
ctx for ctx, result in statuses.items()
|
||||||
if to_status(result).get('state') in ('error', 'failure')
|
if to_status(result).get('state') in ('error', 'failure')
|
||||||
|
Loading…
Reference in New Issue
Block a user