Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1070 from mfogel/ticket_20413

Fix bug introduced in contrib.gis in 74f3884
  • Loading branch information...
commit 63f6ee817ec281b14e1a5fbcdc356cfcab67280b 2 parents c0c3b65 + 3188775
@alex alex authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/contrib/gis/db/models/sql/compiler.py
View
4 django/contrib/gis/db/models/sql/compiler.py
@@ -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()
@@ -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))
Please sign in to comment.
Something went wrong with that request. Please try again.