Misleading code in POTMsgSet

Bug #816366 reported by Jeroen T. Vermeulen
6
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._getExternalTranslationMessages contains some messy code that may lead to future mistakes.

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

Changed in launchpad:
status: Triaged → In Progress
assignee: nobody → Henning Eggers (henninge)
Revision history for this message
Robert Collins (lifeless) wrote :

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.

Changed in launchpad:
importance: Medium → Low
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
tags: added: qa-untestable
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.