Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
@adrianholovaty adrianholovaty authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  django/db/models/sql/subqueries.py
View
1  django/db/models/sql/subqueries.py
@@ -349,6 +349,7 @@ def add_date_select(self, column, lookup_type, order='ASC'):
self.connection.ops.date_trunc_sql)
self.select = [select]
self.select_fields = [None]
+ self.select_related = False # See #7097.
self.distinct = True
self.order_by = order == 'ASC' and [1] or [-1]
Please sign in to comment.
Something went wrong with that request. Please try again.