diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2012-11-15 21:33:56 +0200 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2012-11-15 21:33:56 +0200 |
| commit | 7cfb567e457379f52a80fe0e8d98dd8191391c6e (patch) | |
| tree | c7b35d3238a72d84106d4d3ca75f58f60682e93c /django/contrib/gis/db/models/sql/compiler.py | |
| parent | 1194a9699932088385f9f88869be28a251597f45 (diff) | |
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
Diffstat (limited to 'django/contrib/gis/db/models/sql/compiler.py')
| -rw-r--r-- | django/contrib/gis/db/models/sql/compiler.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/gis/db/models/sql/compiler.py b/django/contrib/gis/db/models/sql/compiler.py index 0dcf50d32a..81a9941c9e 100644 --- a/django/contrib/gis/db/models/sql/compiler.py +++ b/django/contrib/gis/db/models/sql/compiler.py @@ -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: |
