diff --git a/docs_src/sql_databases/sql_app/main.py b/docs_src/sql_databases/sql_app/main.py index 33f63d332..e7508c59d 100644 --- a/docs_src/sql_databases/sql_app/main.py +++ b/docs_src/sql_databases/sql_app/main.py @@ -13,8 +13,8 @@ app = FastAPI() # Dependency def get_db(): + db = SessionLocal() try: - db = SessionLocal() yield db finally: db.close()