From 847f46e9bf88964484c8b76a10af753ea1018311 Mon Sep 17 00:00:00 2001 From: Nick Pope Date: Tue, 22 Feb 2022 09:29:38 +0000 Subject: Removed redundant QuerySet.all() calls in docs and tests. Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager. --- tests/postgres_tests/test_array.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tests/postgres_tests/test_array.py') diff --git a/tests/postgres_tests/test_array.py b/tests/postgres_tests/test_array.py index 28d5924b9d..7243ab6a5a 100644 --- a/tests/postgres_tests/test_array.py +++ b/tests/postgres_tests/test_array.py @@ -278,9 +278,7 @@ class TestQuerying(PostgreSQLTestCase): IntegerArrayModel.objects.create(field=[2, 3]) self.assertSequenceEqual( NullableIntegerArrayModel.objects.filter( - field__in=IntegerArrayModel.objects.all().values_list( - "field", flat=True - ) + field__in=IntegerArrayModel.objects.values_list("field", flat=True) ), self.objs[2:3], ) -- cgit v1.3