summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2016-06-13 20:32:07 +0600
committerTim Graham <timograham@gmail.com>2016-06-13 10:32:07 -0400
commitcee534228cddd6d38a5773f32ad53cc8ec4b504d (patch)
treecc4ed5f3c9ebb1a06348d5e0651884d706252172
parent267dc4adddd2882182f71a7f285a06b1d4b15af0 (diff)
Refs #25645 -- Removed SpatiaLite 3.x compatibility in gis.db.models.functions.Translate.
Complements 47f22e828618581ecd4203d369a939fdfcff3a8b.
-rw-r--r--django/contrib/gis/db/models/functions.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/django/contrib/gis/db/models/functions.py b/django/contrib/gis/db/models/functions.py
index 7355bbcbfc..cbaf80d77d 100644
--- a/django/contrib/gis/db/models/functions.py
+++ b/django/contrib/gis/db/models/functions.py
@@ -435,12 +435,9 @@ class Transform(GeoFunc):
class Translate(Scale):
def as_sqlite(self, compiler, connection):
- func_name = connection.ops.spatial_function_name(self.name)
- if func_name == 'ST_Translate' and len(self.source_expressions) < 4:
- # Always provide the z parameter for ST_Translate (Spatialite >= 3.1)
+ if len(self.source_expressions) < 4:
+ # Always provide the z parameter for ST_Translate
self.source_expressions.append(Value(0))
- elif func_name == 'ShiftCoords' and len(self.source_expressions) > 3:
- raise ValueError("This version of Spatialite doesn't support 3D")
return super(Translate, self).as_sqlite(compiler, connection)