Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Improved error message while setting GeometryProxy

  • Loading branch information...
commit 8d75d1e1bc6052f934b3fc066cd362dae75e99a3 1 parent 1df3c49
authored October 06, 2013 claudep committed October 06, 2013

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  django/contrib/gis/db/models/proxy.py
3  django/contrib/gis/db/models/proxy.py
@@ -59,7 +59,8 @@ def __set__(self, obj, value):
59 59
             # Set with None, WKT, HEX, or WKB
60 60
             pass
61 61
         else:
62  
-            raise TypeError('cannot set %s GeometryProxy with value of type: %s' % (obj.__class__.__name__, type(value)))
  62
+            raise TypeError('Cannot set %s GeometryProxy (%s) with value of type: %s' % (
  63
+                obj.__class__.__name__, gtype, type(value)))
63 64
 
64 65
         # Setting the objects dictionary with the value, and returning.
65 66
         obj.__dict__[self._field.attname] = value

0 notes on commit 8d75d1e

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