Skip to content
Browse files

Improved error message while setting GeometryProxy

  • Loading branch information...
1 parent 1df3c49 commit 8d75d1e1bc6052f934b3fc066cd362dae75e99a3 Étienne Loks committed with claudep
Showing with 2 additions and 1 deletion.
  1. +2 −1 django/contrib/gis/db/models/
3 django/contrib/gis/db/models/
@@ -59,7 +59,8 @@ def __set__(self, obj, value):
# Set with None, WKT, HEX, or WKB
- 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

0 comments on commit 8d75d1e

Please sign in to comment.
Something went wrong with that request. Please try again.