mirror of
https://github.com/fastapi/fastapi.git
synced 2026-10-19 16:45:35 -04:00
📝 Update location of get_db in SQL docs (#1293)
This commit is contained in:
1 parent
f8f0a6e462
commit
d53a253c8d
1 file changed
+1
-1
@@ -13,8 +13,8 @@ app = FastAPI()
|
||||
|
||||
# Dependency
|
||||
def get_db():
|
||||
db = SessionLocal()
|
||||
try:
|
||||
db = SessionLocal()
|
||||
yield db
|
||||
finally:
|
||||
db.close()
|
||||
|
||||
Reference in new issue
Block a user