summaryrefslogtreecommitdiff
path: root/django/db
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2019-02-04 12:03:12 -0500
committerTim Graham <timograham@gmail.com>2019-02-04 13:16:38 -0500
commitd47498c5df7e8861c19fea22e5b04229b510bc3e (patch)
tree9ebfc4ae3cf85d5e375873233ad85a7754044056 /django/db
parent4763c9719135f4de17924d9c8524f1cfe41bc645 (diff)
Fixed #30156 -- Dropped support for SpatiaLite 4.1 and 4.2.
Diffstat (limited to 'django/db')
-rw-r--r--django/db/models/functions/math.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/django/db/models/functions/math.py b/django/db/models/functions/math.py
index 43cbc17a1e..1a574eb9ab 100644
--- a/django/db/models/functions/math.py
+++ b/django/db/models/functions/math.py
@@ -34,12 +34,10 @@ class ATan2(NumericOutputFieldMixin, Func):
arity = 2
def as_sqlite(self, compiler, connection, **extra_context):
- if not getattr(connection.ops, 'spatialite', False) or not (
- (4, 3, 0) <= connection.ops.spatial_version < (5, 0, 0)
- ):
+ if not getattr(connection.ops, 'spatialite', False) or connection.ops.spatial_version >= (5, 0, 0):
return self.as_sql(compiler, connection)
# This function is usually ATan2(y, x), returning the inverse tangent
- # of y / x, but it's ATan2(x, y) on SpatiaLite >= 4.3.0, < 5.0.0.
+ # of y / x, but it's ATan2(x, y) on SpatiaLite < 5.0.0.
# Cast integers to float to avoid inconsistent/buggy behavior if the
# arguments are mixed between integer and float or decimal.
# https://www.gaia-gis.it/fossil/libspatialite/tktview?name=0f72cca3a2