[IMP] runbot_merge: make feedback more deterministic

Before this change, the order of PRs to list in an "unready" feedback
message was whatever the DB returned which could vary. This change
fixes the order by applying model order.
This commit is contained in:
Xavier Morel 2018-12-12 15:28:38 +01:00
parent a0dd87e45b
commit e01ad86171

View File

@ -763,7 +763,7 @@ class PullRequests(models.Model):
for [ids] in self.env.cr.fetchall():
prs = self.browse(ids)
ready = prs.filtered(lambda p: p.state == 'ready')
unready = prs - ready
unready = (prs - ready).sorted()
for r in ready:
self.env['runbot_merge.pull_requests.feedback'].create({