From e9d3920c816090e1a3bad69dfffac94b3de3f37d Mon Sep 17 00:00:00 2001 From: Jakub Miazek Date: Fri, 16 Dec 2022 08:40:02 +0100 Subject: [PATCH] lint B904 --- app/models/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/base.py b/app/models/base.py index d7a665d..c79be3b 100644 --- a/app/models/base.py +++ b/app/models/base.py @@ -37,7 +37,7 @@ class Base: db_session.add(self) return await db_session.commit() except SQLAlchemyError as ex: - raise HTTPException(status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, detail=repr(ex)) + raise HTTPException(status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, detail=repr(ex)) from ex async def delete(self, db_session: AsyncSession): """ @@ -50,7 +50,7 @@ class Base: await db_session.commit() return True except SQLAlchemyError as ex: - raise HTTPException(status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, detail=repr(ex)) + raise HTTPException(status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, detail=repr(ex)) from ex async def update(self, db_session: AsyncSession, **kwargs): """