We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcc75f9 commit e4b4c50Copy full SHA for e4b4c50
activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -1012,7 +1012,7 @@ def invalidate_transaction(exception)
1012
return unless exception.is_a?(TransactionRollbackError)
1013
return unless savepoint_errors_invalidate_transactions?
1014
1015
- current_transaction.state.invalidate! if current_transaction
+ current_transaction.state.invalidate! if current_transaction.open?
1016
end
1017
1018
def retryable_query_error?(exception)
0 commit comments