Фикс преглоса в чат

This commit is contained in:
urec56 2024-10-07 16:21:49 +03:00
parent a45989a057
commit fb6f526dcf

View file

@ -1,3 +1,5 @@
import logging
from sqlalchemy.exc import SQLAlchemyError
from app.dao.chat import ChatDAO
@ -24,8 +26,10 @@ class UnitOfWork:
await self.rollback()
await self.session.close()
except SQLAlchemyError:
logging.critical(exc)
raise BlackPhoenixException
if isinstance(exc, SQLAlchemyError):
logging.critical(exc)
raise BlackPhoenixException
async def commit(self):