Skip to content

Commit

Permalink
Fix API SessionLocal
Browse files Browse the repository at this point in the history
  • Loading branch information
VVoruganti committed Mar 25, 2024
1 parent 83d87ea commit 851712f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/src/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
os.environ["CONNECTION_URI"], connect_args=connect_args, echo=True
)

sessionlocal = async_sessionmaker(autocommit=False, autoflush=False, bind=engine)
SessionLocal = async_sessionmaker(autocommit=False, autoflush=False, bind=engine)
Base = declarative_base()


Expand Down
3 changes: 2 additions & 1 deletion api/src/dependencies.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from fastapi import Depends
from .db import SessionLocal
from sqlalchemy.ext.asyncio import AsyncSession

from .db import SessionLocal


async def get_db():
"""FastAPI Dependency Generator for Database"""
Expand Down

0 comments on commit 851712f

Please sign in to comment.