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 )
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
Note:
See TracTickets
for help on using tickets.