#13198: exclude() bug when used with Q() objects
-------------------------------------+-------------------------------------
Reporter: mucisland | Owner: nobody
Type: Uncategorized | Status: closed
Component: Database layer | Version: 1.1
(models, ORM) | Resolution: duplicate
Severity: Normal | Triage Stage:
Keywords: exclude Q | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by jedediah@…):
* ui_ux: => 0
* type: => Uncategorized
* severity: => Normal
* easy: => 0
Comment:
Still seeing this in Django 1.4, so either it was erroneously marked as a
dupe or it snuck back in. It's pretty simple to reproduce:
{{{
MyModel.objects.exclude(nullable_field=123) => includes rows with
nullable_field=null
MyModel.objects.exclude(Q(nullable_field=123)) => excludes rows with
nullable_field=null
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/13198#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.