mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Handle NullObject instances in Active Job query tag
This commit is contained in:
parent
703d4b216a
commit
af87199a80
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ module ActiveJob
|
|||
end
|
||||
|
||||
ActiveSupport.on_load(:active_record) do
|
||||
ActiveRecord::QueryLogs.taggings[:job] = ->(context) { context[:job].class.name }
|
||||
ActiveRecord::QueryLogs.taggings[:job] = ->(context) { context[:job].class.name unless context[:job].nil? }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue