Normalized Func.as_sqlite() signature.

This commit is contained in:
Tim Graham 2016-03-25 18:51:34 -04:00
parent 82243e5150
commit fb84e877ce
1 changed files with 2 additions and 2 deletions

View File

@ -550,8 +550,8 @@ class Func(Expression):
template = template or self.extra.get('template', self.template) template = template or self.extra.get('template', self.template)
return template % self.extra, params return template % self.extra, params
def as_sqlite(self, *args, **kwargs): def as_sqlite(self, compiler, connection):
sql, params = self.as_sql(*args, **kwargs) sql, params = self.as_sql(compiler, connection)
try: try:
if self.output_field.get_internal_type() == 'DecimalField': if self.output_field.get_internal_type() == 'DecimalField':
sql = 'CAST(%s AS NUMERIC)' % sql sql = 'CAST(%s AS NUMERIC)' % sql