Merge lp:~jpds/launchpad/fix_176396 into lp:launchpad

Proposed by Jonathan Davies
Status: Merged
Approved by: Aaron Bentley
Approved revision: not available
Merged at revision: 10077
Proposed branch: lp:~jpds/launchpad/fix_176396
Merge into: lp:launchpad
Diff against target: 26 lines (+3/-2)
2 files modified
lib/lp/registry/browser/distributionmirror.py (+2/-1)
lib/lp/registry/browser/tests/distributionmirror-views.txt (+1/-1)
To merge this branch: bzr merge lp:~jpds/launchpad/fix_176396
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve
Review via email: mp+16082@code.launchpad.net

Commit message

After deleting a mirror, redirect the user to the +pendingreviewmirrors page instead of the distribution page.

To post a comment you must log in.
Revision history for this message
Jonathan Davies (jpds) wrote :

= Summary =

Mirror listing administrators are being redirected to the "Ubuntu" page when
they delete a pending review mirror, instead of this behaviour, they should
be sent back to the +pendingreviewmirrors page to continue their work.

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/registry/browser/distributionmirror.py

== Pylint notices ==

lib/lp/registry/browser/distributionmirror.py
 193: [C0301] Line too long (79/78)

Revision history for this message
Aaron Bentley (abentley) wrote :

Thanks for fixing the test. Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/browser/distributionmirror.py'
2--- lib/lp/registry/browser/distributionmirror.py 2009-12-08 16:12:56 +0000
3+++ lib/lp/registry/browser/distributionmirror.py 2009-12-14 15:25:26 +0000
4@@ -174,7 +174,8 @@
5 self.next_url = canonical_url(self.context)
6 return
7
8- self.next_url = canonical_url(self.context.distribution)
9+ self.next_url = canonical_url(self.context.distribution,
10+ view_name='+pendingreviewmirrors')
11 self.request.response.addInfoNotification(
12 "Mirror %s has been deleted." % self.context.title)
13 self.context.destroySelf()
14
15=== modified file 'lib/lp/registry/browser/tests/distributionmirror-views.txt'
16--- lib/lp/registry/browser/tests/distributionmirror-views.txt 2009-12-08 10:51:20 +0000
17+++ lib/lp/registry/browser/tests/distributionmirror-views.txt 2009-12-14 15:25:25 +0000
18@@ -326,7 +326,7 @@
19 >>> view.errors
20 []
21 >>> print view.next_url
22- http://launchpad.dev/ubuntu
23+ http://launchpad.dev/ubuntu/+pendingreviewmirrors
24
25 >>> transaction.commit()
26 >>> print ubuntu.getMirrorByName('secret.me-archive')