From b9971195881b08652c604cd3f3a2809af1be00f6 Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Fri, 1 Apr 2022 13:54:09 +0200 Subject: [PATCH] [FIX] runbot: avoid children in team errors When an error is assigned to a team and the error is a child of another one, the two errors are displayed on the team dashboard and adds confusion. --- runbot/models/build_error.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runbot/models/build_error.py b/runbot/models/build_error.py index ee325a16..c070d49f 100644 --- a/runbot/models/build_error.py +++ b/runbot/models/build_error.py @@ -245,8 +245,8 @@ class RunbotTeam(models.Model): name = fields.Char('Team', required=True) user_ids = fields.Many2many('res.users', string='Team Members', domain=[('share', '=', False)]) - dashboard_id = fields.Many2one('runbot.dashboard',string='Dashboard') - build_error_ids = fields.One2many('runbot.build.error', 'team_id', string='Team Errors') + dashboard_id = fields.Many2one('runbot.dashboard', string='Dashboard') + build_error_ids = fields.One2many('runbot.build.error', 'team_id', string='Team Errors', domain=[('parent_id', '=', False)]) path_glob = fields.Char('Module Wildcards', help='Comma separated list of `fnmatch` wildcards used to assign errors automaticaly\n' 'Negative wildcards starting with a `-` can be used to discard some path\n'