Commit e871e021 authored by Anssi Kääriäinen's avatar Anssi Kääriäinen
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 a0155f35.
parent 9e5ada79
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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: