mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Refs #30446 -- Removed unnecessary Value(..., output_field) in docs and tests.
This commit is contained in:
parent
1e38f1191d
commit
156a2138db
7 changed files with 34 additions and 103 deletions
|
@ -841,7 +841,7 @@ class AggregateTestCase(TestCase):
|
|||
Book.objects.aggregate(fail=F('price'))
|
||||
|
||||
def test_nonfield_annotation(self):
|
||||
book = Book.objects.annotate(val=Max(Value(2, output_field=IntegerField()))).first()
|
||||
book = Book.objects.annotate(val=Max(Value(2))).first()
|
||||
self.assertEqual(book.val, 2)
|
||||
book = Book.objects.annotate(val=Max(Value(2), output_field=IntegerField())).first()
|
||||
self.assertEqual(book.val, 2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue