mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-28 16:08:22 +08:00
Fix invalid return in reports jobs [SCI-6409] (#3777)
This commit is contained in:
parent
de00f1d13b
commit
78b89733ab
2 changed files with 2 additions and 4 deletions
|
@ -8,8 +8,7 @@ module Reports
|
||||||
queue_as :reports
|
queue_as :reports
|
||||||
|
|
||||||
discard_on StandardError do |job, error|
|
discard_on StandardError do |job, error|
|
||||||
report = Report.find_by(id: job.arguments.first)
|
report = Report.find(job.arguments.first)
|
||||||
return if report.blank?
|
|
||||||
|
|
||||||
ActiveRecord::Base.no_touching do
|
ActiveRecord::Base.no_touching do
|
||||||
report.docx_error!
|
report.docx_error!
|
||||||
|
|
|
@ -12,8 +12,7 @@ module Reports
|
||||||
queue_as :reports
|
queue_as :reports
|
||||||
|
|
||||||
discard_on StandardError do |job, error|
|
discard_on StandardError do |job, error|
|
||||||
report = Report.find_by(id: job.arguments.first)
|
report = Report.find(job.arguments.first)
|
||||||
return if report.blank?
|
|
||||||
|
|
||||||
ActiveRecord::Base.no_touching do
|
ActiveRecord::Base.no_touching do
|
||||||
report.pdf_error!
|
report.pdf_error!
|
||||||
|
|
Loading…
Add table
Reference in a new issue