mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[FIX] runbot: fix bundle without batch display
In some case, when creating a bundle from the backend, it is possible that the bundle has no batch at all, making _get_global_result() fail.
This commit is contained in:
parent
58f0f8108a
commit
4f3838b7e9
@ -59,6 +59,8 @@ class Batch(models.Model):
|
||||
|
||||
def _get_global_result(self):
|
||||
"""Returns the worst result from the related builds and logs"""
|
||||
if not self:
|
||||
return 'ok'
|
||||
self.ensure_one()
|
||||
batch_result = 'warn' if any(log.level != 'INFO' for log in self.log_ids) else 'ok'
|
||||
if self.state == 'skipped':
|
||||
|
Loading…
Reference in New Issue
Block a user