mirror of
https://github.com/fastapi/sqlmodel.git
synced 2026-03-13 09:29:54 +08:00
📝 Update all docs references to Optional to use the new syntax in Python 3.10, e.g. int | None (#1351)
This commit is contained in:
committed by
GitHub
parent
0e5e19773c
commit
61523864f1
@@ -141,7 +141,7 @@ WHERE team.id = ?
|
||||
INFO Engine [cached since 0.001795s ago] (1,)
|
||||
```
|
||||
|
||||
There's something else to note. We marked `team_id` as `Optional[int]`, meaning that this could be `NULL` on the database (and `None` in Python).
|
||||
There's something else to note. We marked `team_id` as `int | None`, meaning that this could be `NULL` on the database (and `None` in Python).
|
||||
|
||||
That means that a hero doesn't have to have a team. And in this case, **Spider-Boy** doesn't have one.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user