From ec3d6c14a1fbab1f2fcc9fe2676869e28bcae3bc Mon Sep 17 00:00:00 2001 From: Aryan Iyappan <69184573+aryan340@users.noreply.github.com> Date: Thu, 7 Mar 2024 08:26:23 +0530 Subject: [PATCH] add commits after deletes and updates --- server/app/repositories/register_flow.py | 1 + server/app/repositories/user_session.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/server/app/repositories/register_flow.py b/server/app/repositories/register_flow.py index bf5d43a..88c9fc4 100644 --- a/server/app/repositories/register_flow.py +++ b/server/app/repositories/register_flow.py @@ -85,6 +85,7 @@ async def recreate_verification_code( ), ), ) + await self._session.commit() return verification_code diff --git a/server/app/repositories/user_session.py b/server/app/repositories/user_session.py index 73faa62..af5c6af 100644 --- a/server/app/repositories/user_session.py +++ b/server/app/repositories/user_session.py @@ -65,6 +65,7 @@ async def delete( UserSession.id == user_session_id and UserSession.user_id == user_id, ), ) + await self._session.commit() async def update( self, @@ -79,6 +80,7 @@ async def update( logged_out_at=logged_out_at, ) ) + await self._session.commit() async def logout_all( self, @@ -92,3 +94,4 @@ async def logout_all( logged_out_at=text("NOW()"), ), ) + await self._session.commit()