Skip to content

Commit 68cd4b5

Browse files
committed
Revert "fix: use X | None syntax instead of Optional in py310 code structure example"
This reverts commit bf072b1.
1 parent bf072b1 commit 68cd4b5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs_src/tutorial/code_structure/tutorial002_py310/hero_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import TYPE_CHECKING
1+
from typing import TYPE_CHECKING, Optional
22

33
from sqlmodel import Field, Relationship, SQLModel
44

@@ -13,4 +13,4 @@ class Hero(SQLModel, table=True):
1313
age: int | None = Field(default=None, index=True)
1414

1515
team_id: int | None = Field(default=None, foreign_key="team.id")
16-
team: "Team | None" = Relationship(back_populates="heroes")
16+
team: Optional["Team"] = Relationship(back_populates="heroes")

0 commit comments

Comments
 (0)