mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #27964 -- Made MySQL backend raise exception if spatial transformation is needed for query.
This commit is contained in:
committed by
Tim Graham
parent
964e490847
commit
44a7b98abb
@@ -270,7 +270,7 @@ class GISFunctionsTests(TestCase):
|
||||
def test_area_with_regular_aggregate(self):
|
||||
# Create projected country objects, for this test to work on all backends.
|
||||
for c in Country.objects.all():
|
||||
CountryWebMercator.objects.create(name=c.name, mpoly=c.mpoly)
|
||||
CountryWebMercator.objects.create(name=c.name, mpoly=c.mpoly.transform(3857, clone=True))
|
||||
# Test in projected coordinate system
|
||||
qs = CountryWebMercator.objects.annotate(area_sum=Sum(functions.Area('mpoly')))
|
||||
# Some backends (e.g. Oracle) cannot group by multipolygon values, so
|
||||
|
||||
Reference in New Issue
Block a user