From da71e4bb086593b5ca76bf698358d27ead2cfed2 Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Wed, 6 Dec 2017 14:59:30 +0500 Subject: Fixed #28896 -- Reallowed filtering a queryset with GeometryField=None. Regression in 58da81a5a372a69f0bac801c412b57f3cce5f188. --- tests/gis_tests/geoapp/tests.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') diff --git a/tests/gis_tests/geoapp/tests.py b/tests/gis_tests/geoapp/tests.py index b5f4078981..cfc6829fff 100644 --- a/tests/gis_tests/geoapp/tests.py +++ b/tests/gis_tests/geoapp/tests.py @@ -385,6 +385,9 @@ class GeoLookupTest(TestCase): # Puerto Rico should be NULL (it's a commonwealth unincorporated territory) self.assertEqual(1, len(nullqs)) self.assertEqual('Puerto Rico', nullqs[0].name) + # GeometryField=None is an alias for __isnull=True. + self.assertCountEqual(State.objects.filter(poly=None), nullqs) + self.assertCountEqual(State.objects.exclude(poly=None), validqs) # The valid states should be Colorado & Kansas self.assertEqual(2, len(validqs)) -- cgit v1.3