Merge lp:~jtv/launchpad/bug-135052 into lp:launchpad
Proposed by
Jeroen T. Vermeulen
on 2010-01-21
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Curtis Hovey on 2010-01-22 | ||||
| Approved revision: | not available | ||||
| Merged at revision: | not available | ||||
| Proposed branch: | lp:~jtv/launchpad/bug-135052 | ||||
| Merge into: | lp:launchpad | ||||
| Diff against target: |
70 lines (+52/-0) 2 files modified
lib/lp/translations/browser/potemplate.py (+15/-0) lib/lp/translations/stories/standalone/xx-potemplate-admin.txt (+37/-0) |
||||
| To merge this branch: | bzr merge lp:~jtv/launchpad/bug-135052 | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Curtis Hovey (community) | code | Approve on 2010-01-22 | |
| Henning Eggers | 2010-01-21 | Pending | |
|
Review via email:
|
|||
Commit Message
Catch attempt to set both productseries and distroseries for a POTemplate.
To post a comment you must log in.
| Jeroen T. Vermeulen (jtv) wrote : | # |

= Bug 135052 =
A failure to validate input to the POTemplate admin form meant that an administrator could attempt to assign a translation template to both a ProductSeries and a DistroSeries. This triggered and assertion failure (and would otherwise have violated a database constraint). Actually this was an old, known bug that we never bothered to fix because it can only affect a handful of people, and even then when they attempt to do something that they know they shouldn't. I'm only fixing it now because we have a zero-oops policy.
In this branch you'll see a validation method for the form added, plus of course a test to exercise it. The solution is so idiomatic and, frankly, bloody obvious that I did not bother having a proper pre-imp call.
Test:
{{{
./bin/test -vv -t xx-potemplate-admin
}}}
No lint.
Jeroen