Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle foreign key violation with savepoint
Apparently wrapping a potential database error in an eval doesn't prevent DBIx::Class from aborting the transaction. But with a SAVEPOINT we can work around that. svp_rollback will set back the transaction to the sate from svp_begin. For being able to use savepoints we have to be in a transaction, and we don't have that ensured in all our unit tests, so this is adding another txn_do which will do nothing if it's nested. Issue: https://progress.opensuse.org/issues/124487
- Loading branch information