Merge ~cjwatson/launchpad:fix-export-is-stale into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: cae1f0b2cbc9f504950bcbfff96746b4e2938536
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:fix-export-is-stale
Merge into: launchpad:master
Diff against target: 15 lines (+3/-1)
1 file modified
lib/lp/code/model/branch.py (+3/-1)
Reviewer Review Type Date Requested Status
Cristian Gonzalez (community) Approve
Review via email: mp+402974@code.launchpad.net

Commit message

Fix test_bzrsync.TestMarkSnapsStale failures

To post a comment you must log in.
Revision history for this message
Cristian Gonzalez (cristiangsp) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/code/model/branch.py b/lib/lp/code/model/branch.py
2index 452bf4e..c9a98cd 100644
3--- a/lib/lp/code/model/branch.py
4+++ b/lib/lp/code/model/branch.py
5@@ -689,7 +689,9 @@ class Branch(SQLBase, WebhookTargetMixin, BzrIdentityMixin):
6 self,
7 check_permissions=False)
8 for snap in snaps:
9- snap.is_stale = True
10+ # ISnapSet.findByBranch returns security-proxied Snap objects on
11+ # which the is_stale attribute is read-only. Bypass this.
12+ removeSecurityProxy(snap).is_stale = True
13
14 def addToLaunchBag(self, launchbag):
15 """See `IBranch`."""

Subscribers

People subscribed via source and target branches

to status/vote changes: