OOPS setting account as answer contact

Bug #159146 reported by Diogo Matsubara
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Unassigned

Bug Description

OOPS-668E1595 shows that a DB constraint was triggered setting the answer contact for the ava-bzr project.

 2 IntegrityError: ERROR: duplicate key violates unique constraint "personlanguage_person_key" INSERT INTO PersonLanguage (person, language) VALUES (1537687, 119)

Related branches

Revision history for this message
Curtis Hovey (sinzui) wrote :

This may relate to several EN variants set in the user's browser.

    HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.9,de-CH;q=0.8,de;q=0.6,de-DE;q=0.5,en-GB;q=0.4,en-us;q=0.3,en;q=0.1

en-US, en-us, and en are all EN in Launchpad.

utilities.geoip.RequestPreferredLanguages should use a set() instead of a list()
to ensure each language that is looked up by code is unique.

I'm setting this to confirmed because I think we can easily write a test to confirm this OOPS.

Changed in launchpad-answers:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Curtis Hovey (sinzui) wrote :

The first and last items in the the example HTTP_ACCEPT_LANGUAG are the problem. RequestPreferredLanguages returns both as en. Switching to a set is a simple fix.

Changed in launchpad-answers:
assignee: nobody → Curtis Hovey (sinzui)
status: Triaged → In Progress
Curtis Hovey (sinzui)
Changed in launchpad-answers:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in launchpad-answers:
milestone: none → 10.10
tags: added: qa-ok
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
tags: added: qa-needstesting
removed: qa-ok
tags: added: qa-ok
removed: qa-needstesting
tags: added: qa-needstesting
removed: qa-ok
Ursula Junque (ursinha)
tags: added: qa-ok
removed: qa-needstesting
Changed in launchpad-answers:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui)
Changed in launchpad:
assignee: Curtis Hovey (sinzui) → nobody
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.