Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Justin Bronn authored January 04, 2010
6  django/contrib/gis/db/models/sql/compiler.py
@@ -55,8 +55,8 @@ def get_columns(self, with_aliases=False):
55 55
                         aliases.add(r)
56 56
                         col_aliases.add(col[1])
57 57
                 else:
58  
-                    result.append(col.as_sql(qn=qn))
59  
-
  58
+                    result.append(col.as_sql(qn, self.connection))
  59
+                    
60 60
                     if hasattr(col, 'alias'):
61 61
                         aliases.add(col.alias)
62 62
                         col_aliases.add(col.alias)
@@ -70,7 +70,7 @@ def get_columns(self, with_aliases=False):
70 70
         max_name_length = self.connection.ops.max_name_length()
71 71
         result.extend([
72 72
                 '%s%s' % (
73  
-                    self.get_extra_select_format(alias) % aggregate.as_sql(qn=qn, connection=self.connection),
  73
+                    self.get_extra_select_format(alias) % aggregate.as_sql(qn, self.connection),
74 74
                     alias is not None
75 75
                         and ' AS %s' % qn(truncate_name(alias, max_name_length))
76 76
                         or ''

0 notes on commit 89ded97

Please sign in to comment.
Something went wrong with that request. Please try again.