From 81a453ca0f60ca3bc7e9cc1c11f66719e7df19af Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Thu, 20 Jul 2017 14:57:06 +0500 Subject: [PATCH] Removed unneeded check in GeometryField.from_db_value(). Unneeded since 6f43b2b8a55d72d1e8e04163ff0c2091cf6b8ce5. --- django/contrib/gis/db/models/fields.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/django/contrib/gis/db/models/fields.py b/django/contrib/gis/db/models/fields.py index 157deaee88..a639f3c176 100644 --- a/django/contrib/gis/db/models/fields.py +++ b/django/contrib/gis/db/models/fields.py @@ -288,8 +288,7 @@ class GeometryField(GeoSelectFormatMixin, BaseSpatialField): def from_db_value(self, value, expression, connection, context): if value: - if not isinstance(value, Geometry): - value = Geometry(value) + value = Geometry(value) srid = value.srid if not srid and self.srid != -1: value.srid = self.srid