summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-06-26 05:34:26 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-06-26 05:34:26 +0000
commite41df5adccef0e32d4b8b877ec83e9dd271c1ccf (patch)
tree4ab2adae796351f3c294f4c7923f321d5cef304f /tests
parent2c08986f44a52e3bbd5cb1fb9fd6b2b5a80941e3 (diff)
Fixed #7076 -- Include NULL values when excluding non-NULL items.
Based on a patch from emulbreh. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7760 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/queries/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/regressiontests/queries/models.py b/tests/regressiontests/queries/models.py
index 8059798f86..d7c8fba9c6 100644
--- a/tests/regressiontests/queries/models.py
+++ b/tests/regressiontests/queries/models.py
@@ -756,5 +756,11 @@ select_related(). We used to return the parent's Detail record here by mistake.
>>> obj.person.details.data
u'd2'
+Bug #7076 -- excluding shouldn't eliminate NULL entries.
+>>> Item.objects.exclude(modified=time1).order_by('name')
+[<Item: four>, <Item: three>, <Item: two>]
+>>> Tag.objects.exclude(parent__name=t1.name)
+[<Tag: t1>, <Tag: t4>, <Tag: t5>]
+
"""}