Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#8109 closed (duplicate)

list_filter on BooleanField in admin site always displays True objects

Reported by: drizzt 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:


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:

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.

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by ElliottM

  • Component changed from Uncategorized to Admin interface
  • Keywords admin list filter boolean booleanfield added
  • milestone set to 1.0
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from list_filter on BooleanField to list_filter on BooleanField in admin site always displays True objects
  • Triage Stage changed from Unreviewed to Accepted

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 6 years ago by brosner

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #8101

comment:3 Changed 3 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.