📝 Update location of get_db in SQL docs (#1293)

This commit is contained in:
Beau Barker 2020-05-17 20:14:14 +10:00 committed by GitHub
parent f8f0a6e462
commit d53a253c8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,8 +13,8 @@ app = FastAPI()
# Dependency # Dependency
def get_db(): def get_db():
db = SessionLocal()
try: try:
db = SessionLocal()
yield db yield db
finally: finally:
db.close() db.close()