[FIX] runbot: _compute_host_id

If you try to manually create bundle, Odoo will crash, because it will
try to use `name` value that is not set yet. For that we start computing
host_id once `name` is entered.
This commit is contained in:
Andrius Laukavičius 2021-02-13 20:40:57 +02:00 committed by xdo
parent 0ed4728518
commit 5337ecd11f

View File

@ -54,7 +54,7 @@ class Bundle(models.Model):
def _compute_host_id(self):
assigned_only = None
runbots = {}
for bundle in self:
for bundle in self.filtered('name'):
elems = bundle.name.split('-')
for elem in elems:
if elem.startswith('runbot'):