Adding the same potemplate twice causes system error

Bug #2898 reported by Christian Reis
6
Affects Status Importance Assigned to Milestone
Launchpad itself
Invalid
Low
Carlos Perelló Marín

Bug Description

If you +addpotemplate to a product series, press back and submit again, you get:

    *
    * Module canonical.database.adapter, line 133, in execute
      return self._cur.execute(*args, **kwargs)

IntegrityError: ERROR: duplicate key violates unique constraint "potemplate_productseries_ptname_uniq" INSERT INTO POTemplate (id, description, productseries, potemplatename, rawfile, sourcepackagename, languagepack, rawimportstatus, header, owner, path, rawimporter, datecreated, binarypackagename, daterawimport, license, messagecount, copyright, distrorelease, filename, priority, sourcepackageversion, iscurrent) VALUES (9, NULL, 9, 2, 38, NULL, 'f', 2, NULL, 16, NULL, 16, DEFAULT, NULL, CURRENT_TIMESTAMP AT TIME ZONE 'UTC', NULL, 0, NULL, NULL, NULL, NULL, NULL, 't')

Changed in rosetta:
assignee: nobody → carlos
Changed in rosetta:
assignee: carlos → nobody
status: New → Accepted
Revision history for this message
Dafydd Harries (daf) wrote :

Example URL:

https://launchpad.net/products/pmount/+series/main/+addpotemplate

Fixing this might just be a matter of using a more appropriate template name field, which can check for uniqueness appropriately, so that we can get an appropriate error.

Changed in rosetta:
assignee: nobody → gabrielneuman
Revision history for this message
Carlos Perelló Marín (carlos) wrote :

That page doesn't exist anymore.

Changed in rosetta:
assignee: gabrielneuman → carlos
status: Confirmed → Rejected
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.