Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improved error message while setting GeometryProxy

  • Loading branch information...
commit 8d75d1e1bc6052f934b3fc066cd362dae75e99a3 1 parent 1df3c49
Étienne Loks authored claudep committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/contrib/gis/db/models/proxy.py
View
3  django/contrib/gis/db/models/proxy.py
@@ -59,7 +59,8 @@ def __set__(self, obj, value):
# Set with None, WKT, HEX, or WKB
pass
else:
- raise TypeError('cannot set %s GeometryProxy with value of type: %s' % (obj.__class__.__name__, type(value)))
+ raise TypeError('Cannot set %s GeometryProxy (%s) with value of type: %s' % (
+ obj.__class__.__name__, gtype, type(value)))
# Setting the objects dictionary with the value, and returning.
obj.__dict__[self._field.attname] = value
Please sign in to comment.
Something went wrong with that request. Please try again.