mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #29048 -- Added **extra_context to database function as_vendor() methods.
This commit is contained in:
parent
08f360355a
commit
83b04d4f88
11 changed files with 108 additions and 83 deletions
|
@ -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'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue