Issue #1430
closedPackage* unit types fails validation after upgrade
Description
pulp-admin had an incorrect behavior where the default value for the field is '' when the type is a dict. The string versions have made it into the database for any user who used pulp admin to upload a PackageGroup, PackageEnvironment, or PackageCategory. The pulp-admin issue has been fixed, but the database records are already in users databases. This causes validation to fail for PackageGroup, PackageEnvironment, or PackageCategory after an upgrade to 2.8.0.
The solution is to add a migration that looks for the incorrect default of '' on the translated_name field and replaces it with {}. It is slightly less risky to replace the '' with {} versus just removing the '' attribute because other areas of Pulp may check if the attribute exists.
Also this task includes evaluating and fixing the translated_description as well, which likely has the same problem on all 3 Package* unit types.
Related issues
Updated by bmbouter about 9 years ago
- Related to Task #1415: Write a pre 2.8 upgrade script added
Updated by bmbouter about 9 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to bmbouter
Updated by bmbouter about 9 years ago
- Status changed from ASSIGNED to POST
PR available at: https://github.com/pulp/pulp_rpm/pull/751
Added by bmbouter about 9 years ago
Updated by bmbouter about 9 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset fde2f02d49547b32d487d9d2173e49a8b1f42fe5.
Updated by dkliban@redhat.com almost 9 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Adds migration 23 for translated_* fields fix
Also adds test coverage for migration 22 and 23
https://pulp.plan.io/issues/1430 closes #1430