Fixed #29048 -- Added **extra_context to database function as_vendor() methods.

This commit is contained in:
priyanshsaxena 2018-02-08 12:39:00 +05:30 committed by Tim Graham
parent 08f360355a
commit 83b04d4f88
11 changed files with 108 additions and 83 deletions

View file

@ -1083,8 +1083,8 @@ class AggregateTestCase(TestCase):
class Greatest(Func):
function = 'GREATEST'
def as_sqlite(self, compiler, connection):
return super().as_sql(compiler, connection, function='MAX')
def as_sqlite(self, compiler, connection, **extra_context):
return super().as_sql(compiler, connection, function='MAX', **extra_context)
qs = Publisher.objects.annotate(
price_or_median=Greatest(Avg('book__rating'), Avg('book__price'))