mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #28383 -- Made NumPoints GIS function return None for non-LINESTRING geometries on MySQL.
This commit is contained in:
parent
719b370b34
commit
306b961a4d
2 changed files with 2 additions and 9 deletions
|
@ -336,9 +336,8 @@ class GISFunctionsTests(TestCase):
|
|||
self.assertEqual(qs.first().num_points, 2)
|
||||
mpoly_qs = Country.objects.annotate(num_points=functions.NumPoints('mpoly'))
|
||||
if not connection.features.supports_num_points_poly:
|
||||
msg = 'NumPoints can only operate on LineString content on this database.'
|
||||
with self.assertRaisesMessage(TypeError, msg):
|
||||
list(mpoly_qs)
|
||||
for c in mpoly_qs:
|
||||
self.assertIsNone(c.num_points)
|
||||
return
|
||||
|
||||
for c in mpoly_qs:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue