summaryrefslogtreecommitdiff
path: root/tests/regressiontests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-12-19 10:57:54 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-12-19 10:57:54 +0000
commit519178154be44da2ece9ee9609a0217008616454 (patch)
tree668d2ef6f315daf03781b28f54a9c0da5041a0bf /tests/regressiontests
parent97091940b1efbc6018133e9f77402c2983fa702f (diff)
queryset-refactor: Fixed a problem when adding certain additional filters to a queryset that has precisely one filter attached already.
Refs #6154. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6957 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests')
-rw-r--r--tests/regressiontests/queries/models.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/regressiontests/queries/models.py b/tests/regressiontests/queries/models.py
index 7c0b83096f..5af1a19e62 100644
--- a/tests/regressiontests/queries/models.py
+++ b/tests/regressiontests/queries/models.py
@@ -459,5 +459,12 @@ order_by() and filter() calls.
>>> Item.objects.extra(select={'count': 'select count(*) from queries_item_tags where queries_item_tags.item_id = queries_item.id'}).filter(count=1)
[<Item: four>]
+Bug #6154
+Multiple filter statements are joined using "AND" all the time.
+
+>>> Author.objects.filter(id=a1.id).filter(Q(extra__note=n1)|Q(item__note=n3))
+[<Author: a1>]
+>>> Author.objects.filter(Q(extra__note=n1)|Q(item__note=n3)).filter(id=a1.id)
+[<Author: a1>]
"""}