From 5337ecd11f190dbbaff17a8517a4858cab373583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20Laukavi=C4=8Dius?= Date: Sat, 13 Feb 2021 20:40:57 +0200 Subject: [PATCH] [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. --- runbot/models/bundle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runbot/models/bundle.py b/runbot/models/bundle.py index 77a2ae50..f081646d 100644 --- a/runbot/models/bundle.py +++ b/runbot/models/bundle.py @@ -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'):