From 6ec5eb5d74fd18a91256010706ab8b5b583526a9 Mon Sep 17 00:00:00 2001 From: David Chorpash Date: Sun, 19 Jul 2020 02:08:44 -0600 Subject: Refs #31720 -- Defined default output_field of BoolAnd() and BoolOr() aggregate functions. --- docs/ref/contrib/postgres/aggregates.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/ref') diff --git a/docs/ref/contrib/postgres/aggregates.txt b/docs/ref/contrib/postgres/aggregates.txt index aad64a4db7..31202d5304 100644 --- a/docs/ref/contrib/postgres/aggregates.txt +++ b/docs/ref/contrib/postgres/aggregates.txt @@ -82,11 +82,11 @@ General-purpose aggregation functions published = models.BooleanField() rank = models.IntegerField() - >>> from django.db.models import BooleanField, Q + >>> from django.db.models import Q >>> from django.contrib.postgres.aggregates import BoolAnd >>> Comment.objects.aggregate(booland=BoolAnd('published')) {'booland': False} - >>> Comment.objects.aggregate(booland=BoolAnd(Q(rank__lt=100), output_field=BooleanField())) + >>> Comment.objects.aggregate(booland=BoolAnd(Q(rank__lt=100))) {'booland': True} ``BoolOr`` @@ -104,11 +104,11 @@ General-purpose aggregation functions published = models.BooleanField() rank = models.IntegerField() - >>> from django.db.models import BooleanField, Q + >>> from django.db.models import Q >>> from django.contrib.postgres.aggregates import BoolOr >>> Comment.objects.aggregate(boolor=BoolOr('published')) {'boolor': True} - >>> Comment.objects.aggregate(boolor=BoolOr(Q(rank__gt=2), output_field=BooleanField())) + >>> Comment.objects.aggregate(boolor=BoolOr(Q(rank__gt=2))) {'boolor': False} ``JSONBAgg`` -- cgit v1.3