Opened 15 years ago

Last modified 13 years ago

#12105 closed

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

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

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 (0)

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