Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a bug in date queries with GIS backends introduced in [14715].

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14760 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 21f5dc467e3e05dfcdf6e0aedce8f680c7ba7f12 1 parent 4858a8d
@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
@@ -202,7 +202,7 @@ def add_date_select(self, field_name, 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.