mirror of
https://github.com/django/django.git
synced 2025-08-31 15:57:45 +00:00
Fixed #31660 -- Fixed queryset crash when grouping by m2o relation.
Regression in 3a941230c8
.
Thanks Tomasz Szymański for the report.
This commit is contained in:
parent
07506a6114
commit
78ad4b4b02
3 changed files with 30 additions and 4 deletions
|
@ -383,7 +383,9 @@ class BaseExpression:
|
|||
Custom format for select clauses. For example, EXISTS expressions need
|
||||
to be wrapped in CASE WHEN on Oracle.
|
||||
"""
|
||||
return self.output_field.select_format(compiler, sql, params)
|
||||
if hasattr(self.output_field, 'select_format'):
|
||||
return self.output_field.select_format(compiler, sql, params)
|
||||
return sql, params
|
||||
|
||||
@cached_property
|
||||
def identity(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue