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
diff --git a/lib/lp/code/model/branch.py b/lib/lp/code/model/branch.py
index 452bf4e..c9a98cd 100644
--- a/lib/lp/code/model/branch.py
+++ b/lib/lp/code/model/branch.py
@@ -689,7 +689,9 @@ class Branch(SQLBase, WebhookTargetMixin, BzrIdentityMixin):
689 self,689 self,
690 check_permissions=False)690 check_permissions=False)
691 for snap in snaps:691 for snap in snaps:
692 snap.is_stale = True692 # ISnapSet.findByBranch returns security-proxied Snap objects on
693 # which the is_stale attribute is read-only. Bypass this.
694 removeSecurityProxy(snap).is_stale = True
693695
694 def addToLaunchBag(self, launchbag):696 def addToLaunchBag(self, launchbag):
695 """See `IBranch`."""697 """See `IBranch`."""

Subscribers

People subscribed via source and target branches

to status/vote changes: