Objects with a Floatfield value ending in zero can be incorrectly included the object's change history
|Reported by:||metvop <2y4lhcyggs@…>||Owned by:||nobody|
|Severity:||Keywords:||FloatField, object_history, change_form|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||no|
If an object has a Floatfield value ending in zero (e.g., 1.0, 2.0, etc), editing the object using the change_form template results in the Floatfield being rendered by the object_history template even when the Floatfield has not been edited. A user who then clicks on the object's History link will see the Change History page show not only the changes the user made to other fields, but also incorrect entries (for Floatfields ending in zero).
This may be due to some recasting of ints and floats occurring between SQLite and Django because the floats (that is, 1.0, 2.0 etc) are rendered by change_form as 1, 2, etc in the form fields.
This is true for 0.9.7-pre-SVN-7520, as well as 0.96.1, though I've tested this with SQLite 3.5.8 only.
Change History (5)
comment:1 Changed 7 years ago by metvop <metvop@…>
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:2 Changed 7 years ago by ericholscher
- milestone set to 1.0
- Needs tests set
- Triage Stage changed from Unreviewed to Accepted
comment:4 Changed 7 years ago by ubernostrum
- Resolution set to fixed
- Status changed from new to closed