mirror of
https://github.com/fastapi/sqlmodel.git
synced 2025-11-03 22:21:51 +08:00
✏ Fix broken variable/typo in docs for Read Relationships, hero_spider_boy.id => hero_spider_boy.team_id (#106)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
@ -99,7 +99,7 @@ def select_heroes():
|
|||||||
result = session.exec(statement)
|
result = session.exec(statement)
|
||||||
hero_spider_boy = result.one()
|
hero_spider_boy = result.one()
|
||||||
|
|
||||||
statement = select(Team).where(Team.id == hero_spider_boy.id)
|
statement = select(Team).where(Team.id == hero_spider_boy.team_id)
|
||||||
result = session.exec(statement)
|
result = session.exec(statement)
|
||||||
team = result.first()
|
team = result.first()
|
||||||
print("Spider-Boy's team:", team)
|
print("Spider-Boy's team:", team)
|
||||||
|
|||||||
@ -81,7 +81,7 @@ expected_calls = [
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
"Spider-Boy's team:",
|
"Spider-Boy's team:",
|
||||||
{"headquarters": "Wakaland Capital City", "id": 3, "name": "Wakaland"},
|
{"headquarters": "Sharp Tower", "id": 2, "name": "Preventers"},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"Spider-Boy's team again:",
|
"Spider-Boy's team again:",
|
||||||
|
|||||||
Reference in New Issue
Block a user