summaryrefslogtreecommitdiff
path: root/django/db/models/sql
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2015-01-17 00:17:54 +0100
committerClaude Paroz <claude@2xlibre.net>2015-01-30 20:27:18 +0100
commita0b5f15ea5f1abd91da9a5e4e5b6a0fb5a880c43 (patch)
treeab860a2f14d200b6d0e0cccc50af69e2a276e88a /django/db/models/sql
parent293fd5da5b8c7b79bd34ef793ab45c1bb8ac69ea (diff)
Fixed #14483 -- Allowed using subqueries with GIS lookups
Diffstat (limited to 'django/db/models/sql')
-rw-r--r--django/db/models/sql/compiler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py
index 5b647888d1..8f3af37031 100644
--- a/django/db/models/sql/compiler.py
+++ b/django/db/models/sql/compiler.py
@@ -466,7 +466,7 @@ class SQLCompiler(object):
if obj.low_mark == 0 and obj.high_mark is None and not self.query.distinct_fields:
# If there is no slicing in use, then we can safely drop all ordering
obj.clear_ordering(True)
- return obj.get_compiler(connection=self.connection).as_sql()
+ return obj.get_compiler(connection=self.connection).as_sql(subquery=True)
def get_default_columns(self, start_alias=None, opts=None, from_parent=None):
"""