1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #33772 -- Added QuerySet.first()/last() error message on unordered queryset with aggregation.

This commit is contained in:
Pablo Pissi
2022-06-12 22:08:21 -03:00
committed by Mariusz Felisiak
parent db588d4f0e
commit d287294885
4 changed files with 47 additions and 3 deletions

View File

@@ -62,6 +62,7 @@ class GeoExpressionsTests(TestCase):
)
qs = (
City.objects.values("name")
.order_by("name")
.annotate(
distance=Min(
functions.Distance("multifields__point", multi_field.city.point)