Fix migration failing when existing data has duplicates (#88712)

This commit is contained in:
J. Nick Koston 2023-02-24 11:41:44 -06:00 committed by GitHub
parent e69091c6db
commit 69a3738bdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 5 deletions

View file

@ -125,7 +125,7 @@ def session_scope(
need_rollback = True
session.commit()
except Exception as err: # pylint: disable=broad-except
_LOGGER.error("Error executing query: %s", err)
_LOGGER.error("Error executing query: %s", err, exc_info=True)
if need_rollback:
session.rollback()
if not exception_filter or not exception_filter(err):