diff --git a/ormar/fields/foreign_key.py b/ormar/fields/foreign_key.py index dfc3f4b..e981d9e 100644 --- a/ormar/fields/foreign_key.py +++ b/ormar/fields/foreign_key.py @@ -399,7 +399,7 @@ class ForeignKeyField(BaseField): :return: (if needed) registered Model :rtype: Model """ - if cls.to.pk_type() == uuid.UUID and isinstance(value, str): + if cls.to.pk_type() == uuid.UUID and isinstance(value, str): # pragma: nocover value = uuid.UUID(value) if not isinstance(value, cls.to.pk_type()): raise RelationshipInstanceError(