Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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...
commit 7cfb567e457379f52a80fe0e8d98dd8191391c6e 1 parent 1194a96
@akaariai akaariai authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/contrib/gis/db/models/sql/compiler.py
View
4 django/contrib/gis/db/models/sql/compiler.py
@@ -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):
continue
if start_alias:
try:
Please sign in to comment.
Something went wrong with that request. Please try again.