Fixed error in Binary Field

This commit is contained in:
Ross Lawley
2012-08-07 08:53:58 +01:00
parent 2801b38c75
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)