Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.2.X] Fixed a bug in date queries with GIS backends introduced in […

…14716]. Backport of [14760].

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14761 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e86e3031403bccb1fa6d7e4706155a29d4e22407 1 parent 0d6c945
@alex alex authored
View
2  django/contrib/gis/db/models/sql/compiler.py
@@ -56,7 +56,7 @@ def get_columns(self, with_aliases=False):
col_aliases.add(col[1])
else:
result.append(col.as_sql(qn, self.connection))
-
+
if hasattr(col, 'alias'):
aliases.add(col.alias)
col_aliases.add(col.alias)
View
2  django/db/models/sql/subqueries.py
@@ -194,7 +194,7 @@ def add_date_select(self, field, lookup_type, order='ASC'):
alias = result[3][-1]
select = Date((alias, field.column), lookup_type)
self.select = [select]
- self.select_fields = []
+ self.select_fields = [None]
self.select_related = False # See #7097.
self.set_extra_mask([])
self.distinct = True
Please sign in to comment.
Something went wrong with that request. Please try again.