mirror of
https://github.com/django/django.git
synced 2025-08-22 11:34:33 +00:00
Refs #18247 -- Fixed SQLite QuerySet filtering on decimal result of Least and Greatest.
This commit is contained in:
parent
d5977e492e
commit
068d75688f
4 changed files with 29 additions and 5 deletions
|
@ -575,8 +575,8 @@ class Func(Expression):
|
|||
data['expressions'] = data['field'] = arg_joiner.join(sql_parts)
|
||||
return template % data, params
|
||||
|
||||
def as_sqlite(self, compiler, connection):
|
||||
sql, params = self.as_sql(compiler, connection)
|
||||
def as_sqlite(self, compiler, connection, **extra_context):
|
||||
sql, params = self.as_sql(compiler, connection, **extra_context)
|
||||
try:
|
||||
if self.output_field.get_internal_type() == 'DecimalField':
|
||||
sql = 'CAST(%s AS NUMERIC)' % sql
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue