Skip to content

Commit

Permalink
Fix bug introduced in contrib.gis in 74f3884
Browse files Browse the repository at this point in the history
  • Loading branch information
mfogel committed May 15, 2013
1 parent 74f3884 commit 3188775
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/contrib/gis/db/models/sql/compiler.py
Expand Up @@ -121,7 +121,7 @@ def get_default_columns(self, with_aliases=False, col_aliases=None,
"""
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()
Expand Down Expand Up @@ -247,7 +247,7 @@ def _field_column(self, field, table_alias=None, column=None):
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))

Expand Down

0 comments on commit 3188775

Please sign in to comment.