Skip to content

Commit

Permalink
✅ fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
CMHopeSunshine committed May 16, 2024
1 parent 37a9441 commit 4b8a2bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cherry/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,17 +810,17 @@ def _pre_resolve_relationship_field(cls):
elif isinstance(field_info, ForeignKeyField):
raise FieldTypeError(
f"Model {cls}'s ForeignKeyField {field_name} "
f"types must be a subclass of Cherry.Model, not {type(type_)}",
f"types must be a subclass of Cherry.Model, not {type_}",
)
elif isinstance(field_info, ManyToManyField):
raise FieldTypeError(
f"Model {cls}'s ManyToManyField {field_name} types"
f" must be a sequence type of Cherry.Model, not {type(type_)}",
f" must be a sequence type of Cherry.Model, not {type_}",
)
if not check_issubclass(type_, Model):
raise FieldTypeError(
f"Model {cls}'s RelationshipField {field_name} types"
f" must be a subclass of Cherry.Model, not {type(type_)}",
f" must be a subclass of Cherry.Model, not {type_}",
)
field_info.nullable = is_nullable
field_info.related_model = type_
Expand Down

0 comments on commit 4b8a2bb

Please sign in to comment.