[Bug 1581170] [NEW] add existing locale results in 500

Public bug reported:

Steps to reproduce.

1) Go to demo server.
2) Attempt to add any existing locale, for example French Senegal.
3) Server sends

: query did not return a unique result: 2

with HTTP 500. No error is visible through the UI

Furthermore, it would seem that duplicate locales are possible from the
database

datim=# \d i18nlocale
               Table "public.i18nlocale"
    Column | Type | Modifiers

···

--------------+-----------------------------+-----------
i18nlocaleid | integer | not null
uid | character varying(11) |
code | character varying(50) |
created | timestamp without time zone |
lastupdated | timestamp without time zone |
name | character varying(250) | not null
locale | character varying(15) | not null
Indexes:
    "i18nlocale_pkey" PRIMARY KEY, btree (i18nlocaleid)

** Affects: dhis2
     Importance: Undecided
     Assignee: Lars Helge Øverland (larshelge)
         Status: New

** Changed in: dhis2
     Assignee: (unassigned) => Lars Helge Øverland (larshelge)

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1581170

Title:
  add existing locale results in 500

Status in DHIS:
  New

Bug description:
  Steps to reproduce.

  1) Go to demo server.
  2) Attempt to add any existing locale, for example French Senegal.
  3) Server sends

  : query did not return a unique result: 2

  with HTTP 500. No error is visible through the UI

  Furthermore, it would seem that duplicate locales are possible from
  the database

  datim=# \d i18nlocale
                 Table "public.i18nlocale"
      Column | Type | Modifiers
  --------------+-----------------------------+-----------
   i18nlocaleid | integer | not null
   uid | character varying(11) |
   code | character varying(50) |
   created | timestamp without time zone |
   lastupdated | timestamp without time zone |
   name | character varying(250) | not null
   locale | character varying(15) | not null
  Indexes:
      "i18nlocale_pkey" PRIMARY KEY, btree (i18nlocaleid)

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1581170/+subscriptions

Hi Jason

Which version is this? I'm not getting that error..

** Attachment added: "Screen Shot 2016-05-18 at 12.14.10.png"
   https://bugs.launchpad.net/dhis2/+bug/1581170/+attachment/4665120/+files/Screen%20Shot%202016-05-18%20at%2012.14.10.png

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1581170

Title:
  add existing locale results in 500

Status in DHIS:
  New

Bug description:
  Steps to reproduce.

  1) Go to demo server.
  2) Attempt to add any existing locale, for example French Senegal.
  3) Server sends

  : query did not return a unique result: 2

  with HTTP 500. No error is visible through the UI

  Furthermore, it would seem that duplicate locales are possible from
  the database

  datim=# \d i18nlocale
                 Table "public.i18nlocale"
      Column | Type | Modifiers
  --------------+-----------------------------+-----------
   i18nlocaleid | integer | not null
   uid | character varying(11) |
   code | character varying(50) |
   created | timestamp without time zone |
   lastupdated | timestamp without time zone |
   name | character varying(250) | not null
   locale | character varying(15) | not null
  Indexes:
      "i18nlocale_pkey" PRIMARY KEY, btree (i18nlocaleid)

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1581170/+subscriptions