Skip to content

Commit ee576ab

Browse files
yoannmostiangolo
andauthored
✏ 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 <[email protected]>
1 parent ae1b8b5 commit ee576ab

File tree

2 files changed

+2
-2
lines changed
  • docs_src/tutorial/relationship_attributes/read_relationships
  • tests/test_tutorial/test_relationship_attributes/test_read_relationships

2 files changed

+2
-2
lines changed

docs_src/tutorial/relationship_attributes/read_relationships/tutorial001.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def select_heroes():
9999
result = session.exec(statement)
100100
hero_spider_boy = result.one()
101101

102-
statement = select(Team).where(Team.id == hero_spider_boy.id)
102+
statement = select(Team).where(Team.id == hero_spider_boy.team_id)
103103
result = session.exec(statement)
104104
team = result.first()
105105
print("Spider-Boy's team:", team)

tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial001.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
],
8282
[
8383
"Spider-Boy's team:",
84-
{"headquarters": "Wakaland Capital City", "id": 3, "name": "Wakaland"},
84+
{"headquarters": "Sharp Tower", "id": 2, "name": "Preventers"},
8585
],
8686
[
8787
"Spider-Boy's team again:",

0 commit comments

Comments
 (0)