Skip to content
Browse files

[1.5.x] Made gis get_default_columns mirror changes in normal compiler

The copy-pasted part of gis compiler's get_default_columns wasn't
changed to match changes in a0155f3.
  • Loading branch information...
1 parent 9e5ada7 commit e871e0217838ee0a7a47ec1bdf81add5198227e7 @akaariai akaariai committed Dec 30, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 django/contrib/gis/db/models/sql/compiler.py
View
6 django/contrib/gis/db/models/sql/compiler.py
@@ -119,14 +119,16 @@ def get_default_columns(self, with_aliases=False, col_aliases=None,
result = []
if opts is None:
opts = self.query.model._meta
- # Skip all proxy to the root proxied model
- opts = opts.concrete_model._meta
aliases = set()
only_load = self.deferred_to_columns()
if start_alias:
seen = {None: start_alias}
for field, model in opts.get_fields_with_model():
+ # For local fields (even if through proxy) the model should
+ # be None.
+ if model == opts.concrete_model:
+ model = None
if local_only and model is not None:
continue
if start_alias:

0 comments on commit e871e02

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