Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…kend

Backport of 0907d3c from master.
  • Loading branch information...
commit 4f67ab63761a949a4ee8dab5ae38f23b32dc56e5 1 parent 1c1df12
Claude Paroz authored December 26, 2012
2  django/contrib/gis/db/models/sql/query.py
@@ -72,6 +72,8 @@ def convert_values(self, value, field, connection):
72 72
             value = Area(**{field.area_att : value})
73 73
         elif isinstance(field, (GeomField, GeometryField)) and value:
74 74
             value = Geometry(value)
  75
+        elif field is not None:
  76
+            return super(GeoQuery, self).convert_values(value, field, connection)
75 77
         return value
76 78
 
77 79
     def get_aggregation(self, using):
3  django/contrib/gis/tests/geoapp/test_regress.py
@@ -5,7 +5,7 @@
5 5
 
6 6
 from django.contrib.gis.tests.utils import no_mysql, no_spatialite
7 7
 from django.contrib.gis.shortcuts import render_to_kmz
8  
-from django.db.models import Count
  8
+from django.db.models import Count, Min
9 9
 from django.test import TestCase
10 10
 
11 11
 from .models import City, PennsylvaniaCity, State, Truth
@@ -50,6 +50,7 @@ def test_unicode_date(self):
50 50
         mansfield = PennsylvaniaCity.objects.create(name='Mansfield', county='Tioga', point='POINT(-77.071445 41.823881)',
51 51
                                                     founded=founded)
52 52
         self.assertEqual(founded, PennsylvaniaCity.objects.dates('founded', 'day')[0])
  53
+        self.assertEqual(founded, PennsylvaniaCity.objects.aggregate(Min('founded'))['founded__min'])
53 54
 
54 55
     def test_empty_count(self):
55 56
          "Testing that PostGISAdapter.__eq__ does check empty strings. See #13670."

0 notes on commit 4f67ab6

Please sign in to comment.
Something went wrong with that request. Please try again.