Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Another regression fix for select_related handling

This time gis compiler.get_default_columns() wasn't up to date. Thanks
to CI another regression fixed.

Refs #13781
  • Loading branch information...
1 parent 1194a96 commit 7cfb567e457379f52a80fe0e8d98dd8191391c6e @akaariai akaariai committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/contrib/gis/db/models/sql/
4 django/contrib/gis/db/models/sql/
@@ -101,7 +101,7 @@ def get_columns(self, with_aliases=False):
return result
def get_default_columns(self, with_aliases=False, col_aliases=None,
- start_alias=None, opts=None, as_pairs=False, local_only=False):
+ start_alias=None, opts=None, as_pairs=False, from_parent=None):
Computes the default columns for selecting every field in the base
model. Will sometimes be called to pull in related models (e.g. via
@@ -127,7 +127,7 @@ def get_default_columns(self, with_aliases=False, col_aliases=None,
if start_alias:
seen = {None: start_alias}
for field, model in opts.get_fields_with_model():
- if local_only and model is not None:
+ if from_parent and model is not None and issubclass(from_parent, model):
if start_alias:

0 comments on commit 7cfb567

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