mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot_merge: only update pending staging state
The staging validation routine would ignore stagings which were cancelled or ff_failed, but it should also have ignored failed and successful aka all terminal state. Simplify the condition for that: just ignore a staging's validation if the staging is not pending. Closes #211
This commit is contained in:
parent
cd29c648e8
commit
e49b112447
@ -1311,7 +1311,7 @@ class Stagings(models.Model):
|
||||
('pending', 'Pending'),
|
||||
('cancelled', "Cancelled"),
|
||||
('ff_failed', "Fast forward failed")
|
||||
])
|
||||
], default='pending')
|
||||
active = fields.Boolean(default=True)
|
||||
|
||||
staged_at = fields.Datetime(default=fields.Datetime.now)
|
||||
@ -1362,7 +1362,7 @@ class Stagings(models.Model):
|
||||
def _validate(self):
|
||||
Commits = self.env['runbot_merge.commit']
|
||||
for s in self:
|
||||
if s.state in ('cancelled', 'ff_failed'):
|
||||
if s.state != 'pending':
|
||||
continue
|
||||
|
||||
heads = [
|
||||
|
Loading…
Reference in New Issue
Block a user