diff options
| author | Mike Fogel <mike@prismskylabs.com> | 2013-05-13 12:40:39 -0700 |
|---|---|---|
| committer | Mike Fogel <mike@prismskylabs.com> | 2013-05-15 12:55:30 -0700 |
| commit | 74f3884ae04ea57baee9b04ab0b5658a97cfd296 (patch) | |
| tree | 96ec68d3d783df1ce62819c76f02f4f99217d4d1 /django/contrib/gis/db/models/sql | |
| parent | ebfb71c64a786620947c9d598fd1ebae2958acff (diff) | |
Fixed #20413 - Respect Query.get_meta()
Diffstat (limited to 'django/contrib/gis/db/models/sql')
| -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 b488f59362..1f81dbd376 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.query.model._meta + opts = self.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.query.model._meta.db_table + if table_alias is None: table_alias = self.get_meta().db_table return "%s.%s" % (self.quote_name_unless_alias(table_alias), self.connection.ops.quote_name(column or field.column)) |
