1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[1.0.X] Fixed #9985 -- qs.values_list(...).values(...) was constructing incorrect SQL.

Backport of r9717 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9718 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2009-01-08 05:51:15 +00:00
parent fe9cd02f38
commit cc76b89c59
3 changed files with 18 additions and 1 deletions

View File

@@ -1020,6 +1020,10 @@ cases).
# optimise the inner query without losing results.
>>> Annotation.objects.exclude(tag__children__name="t2")
[<Annotation: a2>]
Bug #9985 -- qs.values_list(...).values(...) combinations should work.
>>> Note.objects.values_list("note", flat=True).values("id").order_by("id")
[{'id': 1}, {'id': 2}, {'id': 3}]
"""}
# In Python 2.3 and the Python 2.6 beta releases, exceptions raised in __len__