[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 a0155f3534.
This commit is contained in:
Anssi Kääriäinen 2012-12-30 12:22:26 +02:00
parent 9e5ada79bf
commit e871e02178
1 changed files with 4 additions and 2 deletions

View File

@ -119,14 +119,16 @@ class GeoSQLCompiler(compiler.SQLCompiler):
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: