From 347e567b957644008da4d66798c82e50e4f297c1 Mon Sep 17 00:00:00 2001 From: jaehwang Date: Fri, 7 Nov 2025 13:55:29 +0900 Subject: [PATCH] =?UTF-8?q?delete=20method=EC=97=90=EC=84=9C=20HTTPS=20409?= =?UTF-8?q?=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api-server/app/module/mysql_utils.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/api-server/app/module/mysql_utils.py b/api-server/app/module/mysql_utils.py index 95ae3c4..fc26cd6 100644 --- a/api-server/app/module/mysql_utils.py +++ b/api-server/app/module/mysql_utils.py @@ -54,7 +54,7 @@ async def get_user_info_from_id(user_id:int): raise HTTPException(status.HTTP_404_NOT_FOUND) return user_info -async def get_user_id_from_name(user_name:str): +async def get_user_id_from_name(user_name:str): async with await get_cnx() as cnx: async with await cnx.cursor() as cur: query = ''' @@ -127,9 +127,6 @@ async def delete_user_from_id(user_id:int): } try: await cur.execute(query, data) - except IntegrityError as e: - await cnx.rollback() - raise HTTPException(status_code=status.HTTP_409_CONFLICT, detail="user already exist") await cnx.commit() return @@ -230,9 +227,6 @@ async def delete_blog_from_id(blog_id:int): } try: await cur.execute(query, data) - except IntegrityError as e: - await cnx.rollback() - raise HTTPException(status_code=status.HTTP_409_CONFLICT, detail="already exist") await cnx.commit() return