Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.5.x] Fixed #16408 -- Re-fixed value conversion with Spatialite bac…


Backport of 0907d3c from master.
  • Loading branch information...
commit 4f67ab63761a949a4ee8dab5ae38f23b32dc56e5 1 parent 1c1df12
@claudep claudep authored
2  django/contrib/gis/db/models/sql/
@@ -72,6 +72,8 @@ def convert_values(self, value, field, connection):
value = Area(**{field.area_att : value})
elif isinstance(field, (GeomField, GeometryField)) and value:
value = Geometry(value)
+ elif field is not None:
+ return super(GeoQuery, self).convert_values(value, field, connection)
return value
def get_aggregation(self, using):
3  django/contrib/gis/tests/geoapp/
@@ -5,7 +5,7 @@
from django.contrib.gis.tests.utils import no_mysql, no_spatialite
from django.contrib.gis.shortcuts import render_to_kmz
-from django.db.models import Count
+from django.db.models import Count, Min
from django.test import TestCase
from .models import City, PennsylvaniaCity, State, Truth
@@ -50,6 +50,7 @@ def test_unicode_date(self):
mansfield = PennsylvaniaCity.objects.create(name='Mansfield', county='Tioga', point='POINT(-77.071445 41.823881)',
self.assertEqual(founded, PennsylvaniaCity.objects.dates('founded', 'day')[0])
+ self.assertEqual(founded, PennsylvaniaCity.objects.aggregate(Min('founded'))['founded__min'])
def test_empty_count(self):
"Testing that PostGISAdapter.__eq__ does check empty strings. See #13670."
Please sign in to comment.
Something went wrong with that request. Please try again.