Django

Code

Ticket #7205 (new)

Opened 2 days ago

Objects with a Floatfield value ending in zero can be incorrectly included the object's change history

Reported by: metvop <2y4lhcyggs@fontdrift.com> Assigned to: nobody
Component: Admin interface Version: SVN
Keywords: FloatField, object_history, change_form Cc:
Triage Stage: Unreviewed Has patch: 0
Needs documentation: Needs tests:
Patch needs improvement:

Description

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.

Attachments


Add/Change #7205 (Objects with a Floatfield value ending in zero can be incorrectly included the object's change history)




Change Properties
Action