Opened 17 years ago

Closed 17 years ago

#6532 closed (worksforme)

No matches for unrepresentable float values with list_filter

Reported by: Daniel Pope <dan@…> Owned by: thauber
Component: Core (Cache system) Version: newforms-admin
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When using FloatField as an admin list_filter, float values that cannot be represented with complete fidelity (such as 0.1) are displayed as filter options, but no models appear on the filtered list page.

list_filter should not compare equivalence with floating point numbers, it should test for membership in a range (v-ε, v+ε) for very small ε.

Change History (3)

comment:1 by Honza Král, 17 years ago

Triage Stage: UnreviewedAccepted
Version: SVNnewforms-admin

changed this to newforms-admin branch, that's where admin is living now.

The correct solution for this would probably be to create a FilterSpec to split the values into equidistant intervals and filter using those borders.

comment:2 by thauber, 17 years ago

Owner: changed from nobody to thauber
Status: newassigned

comment:3 by thauber, 17 years ago

Component: Admin interfaceCache system
Resolution: worksforme
Status: assignedclosed

Please provide more info.
such as:
Models
ScreenShots
Database

Note: See TracTickets for help on using tickets.
Back to Top