Misleading code in POTMsgSet
Bug #816366 reported by
Jeroen T. Vermeulen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Low
|
Henning Eggers |
Bug Description
This may get fixed by someone already, but worth making a note. POTMsgSet.
Mainly, a variable "pots" holds SQL that queries not POTemplates (as the name suggests) but POTMsgSets.
There are other things worth cleaning up: the string variable ids_query, which holds more SQL, contains a join that was hidden away in the FROM clause by lower-casing the keywords and leaving out whitespace. Luckily the line stands out because it's also far too long. This looks like it may be experimental code that got committed prematurely.
Related branches
lp:~henninge/launchpad/bug-504062-external-suggestions
- Graham Binns (community): Approve (code)
-
Diff: 324 lines (+117/-17)6 files modifiedlib/lp/translations/browser/potemplate.py (+3/-1)
lib/lp/translations/interfaces/potemplate.py (+13/-0)
lib/lp/translations/model/potemplate.py (+18/-0)
lib/lp/translations/model/potmsgset.py (+11/-8)
lib/lp/translations/scripts/tests/test_cache_suggestive_templates.py (+40/-2)
lib/lp/translations/tests/test_potemplate.py (+32/-6)
Changed in launchpad: | |
status: | Triaged → In Progress |
assignee: | nobody → Henning Eggers (henninge) |
Changed in launchpad: | |
importance: | Medium → Low |
tags: |
added: qa-untestable removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
FTR it wasn't experimental as such and was reviewed per normal; I'm not sure where the long line snuck in.
The variable name probably just reflects lack of experience in that part of the model.