mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-06 15:40:31 +08:00
Merge pull request #3784 from artoscinote/ma_SCI_6409
Fix discarding a job due to non-existant report [SCI-6409]
This commit is contained in:
commit
79739371b7
2 changed files with 4 additions and 2 deletions
|
@ -8,7 +8,8 @@ module Reports
|
|||
queue_as :reports
|
||||
|
||||
discard_on StandardError do |job, error|
|
||||
report = Report.find(job.arguments.first)
|
||||
report = Report.find_by(id: job.arguments.first)
|
||||
next unless report
|
||||
|
||||
ActiveRecord::Base.no_touching do
|
||||
report.docx_error!
|
||||
|
|
|
@ -12,7 +12,8 @@ module Reports
|
|||
queue_as :reports
|
||||
|
||||
discard_on StandardError do |job, error|
|
||||
report = Report.find(job.arguments.first)
|
||||
report = Report.find_by(id: job.arguments.first)
|
||||
next unless report
|
||||
|
||||
ActiveRecord::Base.no_touching do
|
||||
report.pdf_error!
|
||||
|
|
Loading…
Reference in a new issue