mirror of https://github.com/django/django.git
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
This commit is contained in:
parent
1194a96999
commit
7cfb567e45
|
@ -101,7 +101,7 @@ class GeoSQLCompiler(compiler.SQLCompiler):
|
|||
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 @@ class GeoSQLCompiler(compiler.SQLCompiler):
|
|||
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:
|
||||
|
|
Loading…
Reference in New Issue