diff --git a/morango/models/fields/uuids.py b/morango/models/fields/uuids.py index e7f7165..b16c098 100644 --- a/morango/models/fields/uuids.py +++ b/morango/models/fields/uuids.py @@ -32,6 +32,9 @@ def to_python(self, value): value = super(UUIDField, self).to_python(value) return value.hex if isinstance(value, uuid.UUID) else value + def value_from_object(self, obj): + return self.to_python(super(UUIDField, self).value_from_object(obj)) + class UUIDModelMixin(models.Model): """