From 37a9441ba9697f39ab15d6a22915ba386cc14583 Mon Sep 17 00:00:00 2001 From: CMHopeSunshine <277073121@qq.com> Date: Thu, 16 May 2024 10:21:02 +0800 Subject: [PATCH] :white_check_mark: fix test --- cherry/models/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cherry/models/models.py b/cherry/models/models.py index 478e04d..1517550 100644 --- a/cherry/models/models.py +++ b/cherry/models/models.py @@ -810,17 +810,17 @@ def _pre_resolve_relationship_field(cls): elif isinstance(field_info, ForeignKeyField): raise FieldTypeError( f"Model {cls}'s ForeignKeyField {field_name} " - "types must be a subclass of Cherry.Model", + f"types must be a subclass of Cherry.Model, not {type(type_)}", ) elif isinstance(field_info, ManyToManyField): raise FieldTypeError( f"Model {cls}'s ManyToManyField {field_name} types" - " must be a sequence type of Cherry.Model", + f" must be a sequence type of Cherry.Model, not {type(type_)}", ) if not check_issubclass(type_, Model): raise FieldTypeError( f"Model {cls}'s RelationshipField {field_name} types" - " must be a subclass of Cherry.Model", + f" must be a subclass of Cherry.Model, not {type(type_)}", ) field_info.nullable = is_nullable field_info.related_model = type_