Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #12479 -- Pass in connection argument to `as_sql` in `GeoSQLCom…

…piler.get_columns`. Thanks, jpwatts, for bug report and initial patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12083 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 89ded975fe1ff75b5b2456f4ee7e1256a261108e 1 parent b9d698e
@jbronn jbronn authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 django/contrib/gis/db/models/sql/compiler.py
View
6 django/contrib/gis/db/models/sql/compiler.py
@@ -55,8 +55,8 @@ def get_columns(self, with_aliases=False):
aliases.add(r)
col_aliases.add(col[1])
else:
- result.append(col.as_sql(qn=qn))
-
+ result.append(col.as_sql(qn, self.connection))
+
if hasattr(col, 'alias'):
aliases.add(col.alias)
col_aliases.add(col.alias)
@@ -70,7 +70,7 @@ def get_columns(self, with_aliases=False):
max_name_length = self.connection.ops.max_name_length()
result.extend([
'%s%s' % (
- self.get_extra_select_format(alias) % aggregate.as_sql(qn=qn, connection=self.connection),
+ self.get_extra_select_format(alias) % aggregate.as_sql(qn, self.connection),
alias is not None
and ' AS %s' % qn(truncate_name(alias, max_name_length))
or ''
Please sign in to comment.
Something went wrong with that request. Please try again.