Opened 15 years ago

Last modified 13 years ago

#12105 closed

Admin querystring __isnull=False filter doesn't work — at Version 1

Reported by: marcob Owned by: nobody
Component: contrib.admin Version: 1.1
Severity: Keywords: isnull filter
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Alex Gaynor)

If I use __isnull=False with an admin querystring filter I always get a IS NULL query.
Try with:

   http://127.0.0.1:8000/admin/auth/user/?email__isnull=False

   http://127.0.0.1:8000/admin/auth/user/?email__isnull=True

You'll get same results.
I fixed with a tiny patch (attached):

            elif key.endswith('__isnull'):
                value = False if value.lower() == 'false' else Tru

Change History (1)

comment:1 by Alex Gaynor, 15 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top