Fixed error in Binary Field

This commit is contained in:
Ross Lawley 2012-08-07 08:53:58 +01:00
commit f99b7a811b
3 changed files with 7 additions and 1 deletions

View file

@ -1327,7 +1327,7 @@ class UUIDField(BaseField):
super(UUIDField, self).__init__(**kwargs)
def to_python(self, value):
if not self.binary:
if not self._binary:
if not isinstance(value, basestring):
value = unicode(value)
return uuid.UUID(value)