Merge lp:~danilo/launchpad/bug-302449 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Brad Crittenden |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13922 |
Proposed branch: | lp:~danilo/launchpad/bug-302449 |
Merge into: | lp:launchpad |
Diff against target: |
277 lines (+78/-56) 7 files modified
lib/lp/testing/factory.py (+14/-11) lib/lp/translations/browser/potemplate.py (+4/-1) lib/lp/translations/doc/sourcepackagerelease-translations.txt (+2/-2) lib/lp/translations/model/translationimportqueue.py (+32/-34) lib/lp/translations/tests/test_autoapproval.py (+7/-5) lib/lp/translations/tests/test_translationimportqueue.py (+18/-0) lib/lp/translations/utilities/tests/test_translation_importer.py (+1/-3) |
To merge this branch: | bzr merge lp:~danilo/launchpad/bug-302449 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email: mp+73813@code.launchpad.net |
Commit message
[r=bac][bug=302449] Make sure TranslationImpo
Description of the change
= Bug 302449 =
TranslationImpo
actual DB constraint, which leads to OOPSes (it is less restrictive than the constraint).
The problem is that it requires a 'pofile' on the TranslationImpo
== Proposed fix ==
Switch it to storm syntax and make pofile clause an Or() with pofile==None.
Drive-by fix for link visibility for POTemplate:+admin page.
It's still possible to hit the same constraint modifying the import queue entry directly, but that's a different problem.
== Tests ==
bin/test -cvvt addOrUpdateEntry -t translationimpo
(unfortunately, this dates back to when we did a lot of unit testing in doctests)
== Demo and Q/A ==
Upload a tarball with a translation file on the POTemplate:+upload page, and then upload identical PO file with the same path on the POFile:+upload page. It should not OOPS anymore.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
Looks good Danilo, except for the lint issues you say you've already fixed.