mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +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([
|
||||
('sha', '=', head)
|
||||
])
|
||||
statuses = json.loads(commit.statuses)
|
||||
statuses = json.loads(commit.statuses or '{}')
|
||||
reason = next((
|
||||
ctx for ctx, result in statuses.items()
|
||||
if to_status(result).get('state') in ('error', 'failure')
|
||||
|
Loading…
Reference in New Issue
Block a user