From 63ff4177467fbcceedf9c87e9cab4ae31a4ce119 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 11 Oct 2014 16:56:48 +0200 Subject: [PATCH] Fixed a tuple/int comparison in spatialite backend On Python 3, comparing tuple with int raises a TypeError. --- django/contrib/gis/db/backends/spatialite/operations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/gis/db/backends/spatialite/operations.py b/django/contrib/gis/db/backends/spatialite/operations.py index d95b2f6a13..d7a4912fbe 100644 --- a/django/contrib/gis/db/backends/spatialite/operations.py +++ b/django/contrib/gis/db/backends/spatialite/operations.py @@ -21,7 +21,7 @@ class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations): @property def valid_aggregates(self): - if self.spatial_version >= 3: + if self.spatial_version >= (3, 0, 0): return {'Collect', 'Extent', 'Union'} else: return {'Union'}