Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
don't error (and therefore retry) if someone deletes a doc getting re…
…v-saved
  • Loading branch information
drusepth committed Oct 8, 2021
commit b087c42e57b1338a99e1c4e1c5bd7a343f8a8f57
4 changes: 2 additions & 2 deletions app/jobs/save_document_revision_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ class SaveDocumentRevisionJob < ApplicationJob
def perform(*args)
document_id = args.shift

document = Document.find(document_id)
return unless document.present?
document = Document.find_by(id: document_id)
return unless document

# Update cached word count for the document regardless of how often this is called
new_word_count = document.computed_word_count
Expand Down