mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user