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
This commit is contained in:
parent
4858a8d9f3
commit
21f5dc467e
|
@ -56,7 +56,7 @@ class GeoSQLCompiler(compiler.SQLCompiler):
|
||||||
col_aliases.add(col[1])
|
col_aliases.add(col[1])
|
||||||
else:
|
else:
|
||||||
result.append(col.as_sql(qn, self.connection))
|
result.append(col.as_sql(qn, self.connection))
|
||||||
|
|
||||||
if hasattr(col, 'alias'):
|
if hasattr(col, 'alias'):
|
||||||
aliases.add(col.alias)
|
aliases.add(col.alias)
|
||||||
col_aliases.add(col.alias)
|
col_aliases.add(col.alias)
|
||||||
|
|
|
@ -202,7 +202,7 @@ class DateQuery(Query):
|
||||||
alias = result[3][-1]
|
alias = result[3][-1]
|
||||||
select = Date((alias, field.column), lookup_type)
|
select = Date((alias, field.column), lookup_type)
|
||||||
self.select = [select]
|
self.select = [select]
|
||||||
self.select_fields = []
|
self.select_fields = [None]
|
||||||
self.select_related = False # See #7097.
|
self.select_related = False # See #7097.
|
||||||
self.set_extra_mask([])
|
self.set_extra_mask([])
|
||||||
self.distinct = True
|
self.distinct = True
|
||||||
|
|
Loading…
Reference in New Issue