Commit 51b3ee89 authored by Peter Leitzen's avatar Peter Leitzen

Use record's primary key instead of hardcoded `id`

parent 1a95f989
...@@ -12,7 +12,7 @@ class ReactiveCachingWorker ...@@ -12,7 +12,7 @@ class ReactiveCachingWorker
end end
return unless klass return unless klass
klass.find_by(id: id).try(:exclusively_update_reactive_cache!, *args) klass.find_by(klass.primary_key => id).try(:exclusively_update_reactive_cache!, *args)
end end
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment