Opened 17 years ago
Closed 16 years ago
#7245 closed (invalid)
[BUG] Data row duplication while changing inherited models using oldforms manipulators
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Keywords: | bug oldforms row duplication change | |
Cc: | m.gajda@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I've discovered using admin application, that while trying to save some existing object, which model class inherits from other model class, a new rows are added to database instead of changing the existing ones.
The problem is save method of the django.db.models.manipulators.AutomaticManipulator class, which does not set primary key values for super class models, which should be later processed by model's save method.
The attached patch tries to solve this bug by setting primary key values on all super models while preparing data to save in manipulator class. It works for me, but I did not run test suites to check the behaviour in all cases.
Attachments (1)
Change History (3)
by , 17 years ago
Attachment: | propagate-all-pk-values-7245.patch added |
---|
comment:1 by , 17 years ago
Needs tests: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 16 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Closing, because manipulators are gone.
Propagate all pk values patch