Loading django/contrib/gis/db/models/sql/compiler.py +5 −8 Original line number Diff line number Diff line Loading @@ -119,10 +119,10 @@ 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() # Skip all proxy to the root proxied model proxied_model = opts.concrete_model if start_alias: seen = {None: start_alias} Loading @@ -133,9 +133,6 @@ class GeoSQLCompiler(compiler.SQLCompiler): try: alias = seen[model] except KeyError: if model is proxied_model: alias = start_alias else: link_field = opts.get_ancestor_link(model) alias = self.query.join((start_alias, model._meta.db_table, link_field.column, model._meta.pk.column)) Loading Loading
django/contrib/gis/db/models/sql/compiler.py +5 −8 Original line number Diff line number Diff line Loading @@ -119,10 +119,10 @@ 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() # Skip all proxy to the root proxied model proxied_model = opts.concrete_model if start_alias: seen = {None: start_alias} Loading @@ -133,9 +133,6 @@ class GeoSQLCompiler(compiler.SQLCompiler): try: alias = seen[model] except KeyError: if model is proxied_model: alias = start_alias else: link_field = opts.get_ancestor_link(model) alias = self.query.join((start_alias, model._meta.db_table, link_field.column, model._meta.pk.column)) Loading