From 36599bb253b3880ded637b670df6e220c935777a Mon Sep 17 00:00:00 2001 From: Xavier-Do Date: Fri, 15 Dec 2023 10:22:53 +0100 Subject: [PATCH] [FIX] runbot: wakeup child without parent db A check was add to avoid to wakeup a child if there is a parent database Most of the time, it was a mistake. In some case it can be legit, if the parent only creates subbuid without installing any database. This commit fixes that by allowing to wake up child if the parent has no database. --- runbot/models/build.py | 2 +- runbot/templates/utils.xml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runbot/models/build.py b/runbot/models/build.py index f534eb01..645dd125 100644 --- a/runbot/models/build.py +++ b/runbot/models/build.py @@ -1001,7 +1001,7 @@ class BuildResult(models.Model): self._log('wake_up', f'Wake up initiated by {user.name}') if self.local_state != 'done': self._log('wake_up', 'Impossibe to wake up, state is not done') - elif self.parent_id and not user.has_group('runbot.group_runbot_advanced_user'): + elif self.parent_id.database_ids and not user.has_group('runbot.group_runbot_advanced_user'): self._log('wake_up', 'Waking up child builds is for advanced users only') else: self.requested_action = 'wake_up' diff --git a/runbot/templates/utils.xml b/runbot/templates/utils.xml index 70a4ff02..6006329a 100644 --- a/runbot/templates/utils.xml +++ b/runbot/templates/utils.xml @@ -219,7 +219,7 @@ - + @@ -295,13 +295,13 @@ - + Wake up - + Waking up