Skip to content

Commit

Permalink
Merge pull request #947 from aperkins81/master
Browse files Browse the repository at this point in the history
Fixes #946 - Delayed Job fails if original object soft-deleted
  • Loading branch information
albus522 committed Mar 31, 2017
2 parents 80f52ef + a0e74fe commit cbc30b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/delayed/psych_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def visit_Psych_Nodes_Mapping(object) # rubocop:disable CyclomaticComplexity, Me
klass = result.class
id = result[klass.primary_key]
begin
klass.find(id)
klass.unscoped.find(id)
rescue ActiveRecord::RecordNotFound => error # rubocop:disable BlockNesting
raise Delayed::DeserializationError, "ActiveRecord::RecordNotFound, class: #{klass}, primary key: #{id} (#{error.message})"
end
Expand Down

0 comments on commit cbc30b5

Please sign in to comment.