summaryrefslogtreecommitdiff
path: root/django/db/models/sql
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2020-05-14 15:07:08 +0200
committerGitHub <noreply@github.com>2020-05-14 15:07:08 +0200
commit3a941230c85b2702a5e1cd97e17251ce21057efa (patch)
tree8e2e050391b799c910dc31f43254cc5a8e92d477 /django/db/models/sql
parent03537e245886ed1811444c0993025dc2e08ac38b (diff)
Fixed #31584 -- Fixed crash when chaining values()/values_list() after Exists() annotation and aggregation on Oracle.
Oracle requires the EXISTS expression to be wrapped in a CASE WHEN in the GROUP BY clause. Regression in efa1908f662c19038a944129c81462485c4a9fe8.
Diffstat (limited to 'django/db/models/sql')
-rw-r--r--django/db/models/sql/compiler.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py
index 09a9d73077..c368a59226 100644
--- a/django/db/models/sql/compiler.py
+++ b/django/db/models/sql/compiler.py
@@ -139,6 +139,7 @@ class SQLCompiler:
for expr in expressions:
sql, params = self.compile(expr)
+ sql, params = expr.select_format(self, sql, params)
params_hash = make_hashable(params)
if (sql, params_hash) not in seen:
result.append((sql, params))