#8109 closed (duplicate)
list_filter on BooleanField in admin site always displays True objects
Reported by: | Giorgio Salluzzo | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Keywords: | admin list filter boolean booleanfield | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
With last SVN I'm getting an error filtering on a boolean field.
In any case I can't list False items because SQL contains always "= true".
This is one of the queries made with the following GET on the filter:
/admin/products/nsale/?is_activeexact=0
SELECT COUNT(*) FROM "products_nsale" WHERE "products_nsale"."is_active" = true
My dev system is an Ubuntu 8.04 with Python 2.5, psycopg2 and Postgresql 8.3.
Change History (3)
comment:1 by , 16 years ago
Component: | Uncategorized → Admin interface |
---|---|
Keywords: | admin list filter boolean booleanfield added |
milestone: | → 1.0 |
Summary: | list_filter on BooleanField → list_filter on BooleanField in admin site always displays True objects |
Triage Stage: | Unreviewed → Accepted |
Note:
See TracTickets
for help on using tickets.
This happens for me in mysql, and the actual database backend is filtering correctly for me, so it has to be the admin site.