diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-05-15 15:03:53 -0700 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-05-15 15:03:53 -0700 |
| commit | 63f6ee817ec281b14e1a5fbcdc356cfcab67280b (patch) | |
| tree | b0ce0224bc10c96449d847aae3c6455a73cd7974 | |
| parent | c0c3b65de99d638efcb971702a88be42f388989a (diff) | |
| parent | 31887751746088d99b2f607f929c0c4a02978740 (diff) | |
Merge pull request #1070 from mfogel/ticket_20413
Fix bug introduced in contrib.gis in 74f3884ae0
| -rw-r--r-- | django/contrib/gis/db/models/sql/compiler.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/gis/db/models/sql/compiler.py b/django/contrib/gis/db/models/sql/compiler.py index 1f81dbd376..b2befd44b2 100644 --- a/django/contrib/gis/db/models/sql/compiler.py +++ b/django/contrib/gis/db/models/sql/compiler.py @@ -121,7 +121,7 @@ class GeoSQLCompiler(compiler.SQLCompiler): """ result = [] if opts is None: - opts = self.get_meta() + opts = self.query.get_meta() aliases = set() only_load = self.deferred_to_columns() seen = self.query.included_inherited_models.copy() @@ -247,7 +247,7 @@ class GeoSQLCompiler(compiler.SQLCompiler): used. If `column` is specified, it will be used instead of the value in `field.column`. """ - if table_alias is None: table_alias = self.get_meta().db_table + if table_alias is None: table_alias = self.query.get_meta().db_table return "%s.%s" % (self.quote_name_unless_alias(table_alias), self.connection.ops.quote_name(column or field.column)) |
