mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-05 06:32:07 +08:00
Hadle missing experiment previews [SCI-3949]
This commit is contained in:
parent
ab395f46d0
commit
00921a5f6a
1 changed files with 5 additions and 0 deletions
|
@ -236,6 +236,11 @@ class ExperimentsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def updated_img
|
def updated_img
|
||||||
|
if @experiment.workflowimg_file_name.present? && !@experiment.workflowimg.attached?
|
||||||
|
@experiment.generate_workflow_img
|
||||||
|
@experiment.update(workflowimg_file_name: nil)
|
||||||
|
end
|
||||||
|
|
||||||
if @experiment.workflowimg.attached? && !@experiment.workflowimg_exists?
|
if @experiment.workflowimg.attached? && !@experiment.workflowimg_exists?
|
||||||
@experiment.workflowimg.purge
|
@experiment.workflowimg.purge
|
||||||
@experiment.generate_workflow_img
|
@experiment.generate_workflow_img
|
||||||
|
|
Loading…
Reference in a new issue