mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
Additional check for attached workflowimages
This commit is contained in:
parent
e6e94d5784
commit
2ef095b003
1 changed files with 1 additions and 0 deletions
|
@ -33,6 +33,7 @@ class ConvertExperimentsToActiveStorage < ActiveRecord::Migration[5.2]
|
|||
|
||||
model.find_each.each do |instance|
|
||||
attachments.each do |attachment|
|
||||
next if instance.workflowimg.attached?
|
||||
next if instance.__send__("#{attachment}_file_name").blank?
|
||||
|
||||
res = ActiveRecord::Base.connection.raw_connection.exec_prepared(
|
||||
|
|
Loading…
Reference in a new issue