Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#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: master
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: UI/UX:

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 Changed 8 years ago by ElliottM

Component: UncategorizedAdmin interface
Keywords: admin list filter boolean booleanfield added
milestone: 1.0
Summary: list_filter on BooleanFieldlist_filter on BooleanField in admin site always displays True objects
Triage Stage: UnreviewedAccepted

This happens for me in mysql, and the actual database backend is filtering correctly for me, so it has to be the admin site.

comment:2 Changed 8 years ago by Brian Rosner

Resolution: duplicate
Status: newclosed

Duplicate of #8101

comment:3 Changed 5 years ago by Jacob

milestone: 1.0

Milestone 1.0 deleted

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