You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
В этом случае rollback разве не всегда выполняется?
async def __aexit__(self, *args):
"""Закрытие контекста и откат на случай ошибки."""
self._session.expunge_all()
await self.rollback()
await self._session.close()
self._inside_context_manager = False
Возможно, должны быть так?
async def __aexit__(self, exc_type, exc_value, exc_tb):
"""Закрытие контекста и откат на случай ошибки."""
if exc_type is not None:
await self.rollback()
return True # Исключение было обработано
The text was updated successfully, but these errors were encountered:
В этом случае rollback разве не всегда выполняется?
Возможно, должны быть так?
The text was updated successfully, but these errors were encountered: