ProductSeries.setPackaging() should not change existing records
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Abel Deuring |
Bug Description
If ProductSeries.
1. An IntegrityError can occur. This happens, when two different source packages of the same distroseries are linked to the same productseries: The method iterates over self.packagings; the iteration stops at the first packaging for the "right" distroseries. If setPackaging() is called with the parameters of the second existing packaging, the iteration stops at the first packaging, and the subsequent code sets the property sourcepackagename. Then we would have two records for one sourcepackage, which a DB contraint does not allow:
"packaging_
2. Changing an existing record without triggered a related translation sharing job causes inconcsistencies with translation sharing.
Related branches
- j.c.sackett (community): Approve
-
Diff: 220 lines (+102/-17)3 files modifiedlib/lp/registry/browser/tests/packaging-views.txt (+19/-8)
lib/lp/registry/model/productseries.py (+4/-9)
lib/lp/registry/tests/test_productseries.py (+79/-0)
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
note that we can have two or more sourcepackage of one distroseries linked to one productseries, if the packging links are created in sourcepackage views.