1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Improved error message while setting GeometryProxy

This commit is contained in:
Étienne Loks 2013-10-06 21:28:17 +02:00 committed by Claude Paroz
parent 1df3c49a1a
commit 8d75d1e1bc

View File

@ -59,7 +59,8 @@ class GeometryProxy(object):
# 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