-
-
Notifications
You must be signed in to change notification settings - Fork 538
Open
Description
class AuthorSchema(ModelSchema):
if TYPE_CHECKING:
id: int
name: str
role: str
image: str
class Meta:
model = Author
fields = ["id", "name", "role", "image"]
class TipSchema(ModelSchema):
if TYPE_CHECKING:
id: int
name: str
text: str
author: AuthorSchema
class Meta:
model = Tip
fields = ["id", "name", "text", "author"]In this Code author is in author: AuthorSchema and in the fields list.
What is the expected behaviour? Returning the id or an object to type AuthorSchema?
Maybe the checker could raise an error that this configuration is not allowed.
Metadata
Metadata
Assignees
Labels
No labels