Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #7097 -- dates() queries now work as expected with select_relat…

…ed() -- that is, select_related() has no effect on the query. Thanks for reporting, Marco

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit d649d0f5f887f31fb44ae886ec93280d64cfc658 1 parent 9c53847
Adrian Holovaty authored April 28, 2008

Showing 1 changed file with 1 addition and 0 deletions. Show diff stats Hide diff stats

  1. 1  django/db/models/sql/subqueries.py
1  django/db/models/sql/subqueries.py
@@ -349,6 +349,7 @@ def add_date_select(self, column, lookup_type, order='ASC'):
349 349
                 self.connection.ops.date_trunc_sql)
350 350
         self.select = [select]
351 351
         self.select_fields = [None]
  352
+        self.select_related = False # See #7097.
352 353
         self.distinct = True
353 354
         self.order_by = order == 'ASC' and [1] or [-1]
354 355
 

0 notes on commit d649d0f

Please sign in to comment.
Something went wrong with that request. Please try again.