Skip to content

Commit af87199

Browse files
committed
Handle NullObject instances in Active Job query tag
1 parent 703d4b2 commit af87199

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activejob/lib/active_job/railtie.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class Railtie < Rails::Railtie # :nodoc:
7070
end
7171

7272
ActiveSupport.on_load(:active_record) do
73-
ActiveRecord::QueryLogs.taggings[:job] = ->(context) { context[:job].class.name }
73+
ActiveRecord::QueryLogs.taggings[:job] = ->(context) { context[:job].class.name unless context[:job].nil? }
7474
end
7575
end
7676
end

0 commit comments

Comments
 (0)