From ee576ab279b88cedef3e241203b112080c9d7066 Mon Sep 17 00:00:00 2001 From: Yoann Mosteiro <41114561+yoannmos@users.noreply.github.com> Date: Sun, 28 Aug 2022 00:06:56 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=20Fix=20broken=20variable/typo=20in?= =?UTF-8?q?=20docs=20for=20Read=20Relationships,=20`hero=5Fspider=5Fboy.id?= =?UTF-8?q?`=20=3D>=20`hero=5Fspider=5Fboy.team=5Fid`=20(#106)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sebastián Ramírez --- .../relationship_attributes/read_relationships/tutorial001.py | 2 +- .../test_read_relationships/test_tutorial001.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs_src/tutorial/relationship_attributes/read_relationships/tutorial001.py b/docs_src/tutorial/relationship_attributes/read_relationships/tutorial001.py index 5f718ca..3b13007 100644 --- a/docs_src/tutorial/relationship_attributes/read_relationships/tutorial001.py +++ b/docs_src/tutorial/relationship_attributes/read_relationships/tutorial001.py @@ -99,7 +99,7 @@ def select_heroes(): result = session.exec(statement) 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) team = result.first() print("Spider-Boy's team:", team) diff --git a/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial001.py b/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial001.py index 887c98e..9fc7001 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial001.py +++ b/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial001.py @@ -81,7 +81,7 @@ expected_calls = [ ], [ "Spider-Boy's team:", - {"headquarters": "Wakaland Capital City", "id": 3, "name": "Wakaland"}, + {"headquarters": "Sharp Tower", "id": 2, "name": "Preventers"}, ], [ "Spider-Boy's team again:",