Ticket #16408: 16408-4.diff

File 16408-4.diff, 1.7 KB (added by Claude Paroz, 12 years ago)

Call parent convert_values

  • django/contrib/gis/db/models/sql/query.py

    diff --git a/django/contrib/gis/db/models/sql/query.py b/django/contrib/gis/db/models/sql/query.py
    index 3b8245e..8f78f2b 100644
    a b class GeoQuery(sql.Query):  
    7272            value = Area(**{field.area_att : value})
    7373        elif isinstance(field, (GeomField, GeometryField)) and value:
    7474            value = Geometry(value)
     75        else:
     76            return super(GeoQuery, self).convert_values(value, field, connection)
    7577        return value
    7678
    7779    def get_aggregation(self, using):
  • django/contrib/gis/tests/geoapp/test_regress.py

    diff --git a/django/contrib/gis/tests/geoapp/test_regress.py b/django/contrib/gis/tests/geoapp/test_regress.py
    index 0e9c5c4..15e8555 100644
    a b from datetime import datetime  
    55
    66from django.contrib.gis.tests.utils import no_mysql, no_spatialite
    77from django.contrib.gis.shortcuts import render_to_kmz
    8 from django.db.models import Count
     8from django.db.models import Count, Min
    99from django.test import TestCase
    1010
    1111from .models import City, PennsylvaniaCity, State, Truth
    class GeoRegressionTests(TestCase):  
    5050        mansfield = PennsylvaniaCity.objects.create(name='Mansfield', county='Tioga', point='POINT(-77.071445 41.823881)',
    5151                                                    founded=founded)
    5252        self.assertEqual(founded, PennsylvaniaCity.objects.dates('founded', 'day')[0])
     53        self.assertEqual(founded, PennsylvaniaCity.objects.aggregate(Min('founded'))['founded__min'])
    5354
    5455    def test_empty_count(self):
    5556         "Testing that PostGISAdapter.__eq__ does check empty strings. See #13670."
Back to Top