Skip to content

Commit

Permalink
Apply the fix to 8.0 as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Dantemss committed Mar 11, 2024
1 parent fdc8fd5 commit d2f4e77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/lev/routine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,8 @@ def runner=(runner)
def in_transaction(options={})
if transaction_run_by?(self)
isolation_symbol = self.class.transaction_isolation.symbol
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1 &&
if (ActiveRecord::VERSION::MAJOR >= 8 ||
(ActiveRecord::VERSION::MAJOR == 7 && ActiveRecord::VERSION::MINOR >= 1)) &&
ActiveRecord::Base.connection.transaction_open?
# Don't even try to set transaction isolation if the transaction is already open
ActiveRecord::Base.transaction do
Expand Down

0 comments on commit d2f4e77

Please sign in to comment.