Фикс преглоса в чат
This commit is contained in:
parent
a45989a057
commit
fb6f526dcf
1 changed files with 4 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue