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.
This commit is contained in:
Nick Pope 2022-02-22 09:29:38 +00:00 committed by GitHub
parent 7ba6ebe914
commit 847f46e9bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 184 additions and 209 deletions

View file

@ -73,7 +73,7 @@ class BooleanFieldTests(TestCase):
# When an extra clause exists, the boolean conversions are applied with
# an offset (#13293).
b5 = BooleanModel.objects.all().extra(select={"string_col": "string"})[0]
b5 = BooleanModel.objects.extra(select={"string_col": "string"})[0]
self.assertNotIsInstance(b5.pk, bool)
def test_select_related(self):