Skip to content

Commit

Permalink
πŸ“ Rename variable in example for Python 3.7+ for consistency with 3.1…
Browse files Browse the repository at this point in the history
…0+ (I missed that change before)
  • Loading branch information
tiangolo committed Jul 17, 2024
1 parent 6da6465 commit ad70ba0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs_src/advanced/uuid/tutorial001.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ def create_db_and_tables():

def create_hero():
with Session(engine) as session:
hero_1 = Hero(name="Deadpond", secret_name="Dive Wilson")
hero = Hero(name="Deadpond", secret_name="Dive Wilson")
print("The hero before saving in the DB")
print(hero_1)
print(hero)
print("The hero ID was already set")
print(hero_1.id)
session.add(hero_1)
print(hero.id)
session.add(hero)
session.commit()
session.refresh(hero_1)
session.refresh(hero)
print("After saving in the DB")
print(hero_1)
print(hero)


def select_hero():
Expand Down

0 comments on commit ad70ba0

Please sign in to comment.