Skip to content

Commit

Permalink
Merge 274611a into 6d0a6b2
Browse files Browse the repository at this point in the history
  • Loading branch information
oseiskar committed Nov 3, 2014
2 parents 6d0a6b2 + 274611a commit 8de3618
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 @@ -35,7 +35,7 @@ def visit_Psych_Nodes_Mapping(object) # rubocop:disable CyclomaticComplexity, Me
result = super
if defined?(ActiveRecord::Base) && result.is_a?(ActiveRecord::Base)
begin
result.class.find(result[result.class.primary_key])
result.class.unscoped.find(result[result.class.primary_key])
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 8de3618

Please sign in to comment.