mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[IMP] runbot_merge: better notification of stored field update
Using `modified` seems safer than just blowing the cache with respect to stored computed fields depending on PR state (not sure there are any but it's likely).
This commit is contained in:
parent
f91629f693
commit
63271cd82e
@ -1207,7 +1207,7 @@ class PullRequests(models.Model):
|
|||||||
WHERE id = %s AND state != 'merged'
|
WHERE id = %s AND state != 'merged'
|
||||||
''', [self.id])
|
''', [self.id])
|
||||||
self.env.cr.commit()
|
self.env.cr.commit()
|
||||||
self.invalidate_cache(fnames=['state'], ids=[self.id])
|
self.modified(['state'])
|
||||||
if self.env.cr.rowcount:
|
if self.env.cr.rowcount:
|
||||||
self.env['runbot_merge.pull_requests.tagging'].create({
|
self.env['runbot_merge.pull_requests.tagging'].create({
|
||||||
'pull_request': self.number,
|
'pull_request': self.number,
|
||||||
|
Loading…
Reference in New Issue
Block a user