diff --git a/.github/workflows/moodle-ci.yml b/.github/workflows/moodle-ci.yml index e24b31c..31a8d43 100644 --- a/.github/workflows/moodle-ci.yml +++ b/.github/workflows/moodle-ci.yml @@ -16,7 +16,7 @@ jobs: services: postgres: - image: postgres:16 + image: postgres:13 env: POSTGRES_USER: 'postgres' POSTGRES_HOST_AUTH_METHOD: 'trust' diff --git a/lib.php b/lib.php index 909764c..a389c04 100644 --- a/lib.php +++ b/lib.php @@ -119,6 +119,7 @@ function adleradaptivity_delete_instance(int $instance_id): bool { $transaction->allow_commit(); } catch (Exception $e) { $logger->error('Could not delete adleradaptivity instance with id ' . $instance_id); + $transaction->rollback($e); try { $transaction->rollback($e); } catch (Exception $e) {