We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e0d221 commit b087c42Copy full SHA for b087c42
app/jobs/save_document_revision_job.rb
@@ -4,8 +4,8 @@ class SaveDocumentRevisionJob < ApplicationJob
4
def perform(*args)
5
document_id = args.shift
6
7
- document = Document.find(document_id)
8
- return unless document.present?
+ document = Document.find_by(id: document_id)
+ return unless document
9
10
# Update cached word count for the document regardless of how often this is called
11
new_word_count = document.computed_word_count
0 commit comments