Refs #34013 -- Registered instance lookups as documented in tests.

This commit is contained in:
Simon Charette 2023-12-16 14:05:36 -05:00 committed by GitHub
parent c83c639ba0
commit eea4f92f9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -1734,7 +1734,7 @@ class AggregateTestCase(TestCase):
super().__init__(expr, 100)
sum_field = IntegerField()
sum_field.register_instance_lookup(Mod100, "mod100")
sum_field.register_lookup(Mod100, "mod100")
publisher_pages = (
Book.objects.values("publisher")
.annotate(sum_pages=Sum("pages", output_field=sum_field))