diff --git a/CHANGELOG.md b/CHANGELOG.md index bc4504eb51ab3d3efbb332aeef293c3e4c69b8f3..c27fe82478ef9ed3a0f603cb8ff117042beea0f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,3 @@ -# v2.19.2 - -* added `db_call` +# v2.20.2 +* fixed transaction to log only for real exceptions diff --git a/satella/__init__.py b/satella/__init__.py index 397e37cf014ec1d3f92f12e3dffb2ef514e74424..2401f12e2ccf33f628fcdc7d868b2b0aa943a575 100644 --- a/satella/__init__.py +++ b/satella/__init__.py @@ -1 +1 @@ -__version__ = '2.20.1' +__version__ = '2.20.2' diff --git a/satella/db.py b/satella/db.py index 73bc1c9da3462fe4f5f0704ccb6e326e1c6f2d03..03157ab843b393f53472b67bfc41ee6507710da5 100644 --- a/satella/db.py +++ b/satella/db.py @@ -37,7 +37,7 @@ class transaction: else: self.connection.rollback() - if self.log_exception: + if exc_val is None and self.log_exception: logger.error('Exception occurred of type %s', exc_type, exc_info=exc_val) self.cursor.close()