mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot: make archive work when an error has no linked build
This commit is contained in:
parent
7aa68eb3ac
commit
93cd43cd72
@ -178,7 +178,7 @@ class BuildError(models.Model):
|
||||
if not (self.env.su or self.user_has_groups('runbot.group_runbot_admin')):
|
||||
if build_error.test_tags:
|
||||
raise UserError("This error as a test-tag and can only be (de)activated by admin")
|
||||
if not vals['active'] and build_error.last_seen_date + relativedelta(days=1) > fields.Datetime.now():
|
||||
if not vals['active'] and build_error.active and build_error.last_seen_date and build_error.last_seen_date + relativedelta(days=1) > fields.Datetime.now():
|
||||
raise UserError("This error broke less than one day ago can only be deactivated by admin")
|
||||
return super().write(vals)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user