Fix invalid return in reports jobs [SCI-6409] (#3777)

This commit is contained in:
artoscinote 2022-01-13 14:36:09 +01:00 committed by GitHub
parent de00f1d13b
commit 78b89733ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -8,8 +8,7 @@ module Reports
queue_as :reports
discard_on StandardError do |job, error|
report = Report.find_by(id: job.arguments.first)
return if report.blank?
report = Report.find(job.arguments.first)
ActiveRecord::Base.no_touching do
report.docx_error!

View file

@ -12,8 +12,7 @@ module Reports
queue_as :reports
discard_on StandardError do |job, error|
report = Report.find_by(id: job.arguments.first)
return if report.blank?
report = Report.find(job.arguments.first)
ActiveRecord::Base.no_touching do
report.pdf_error!