Additional check for attached workflowimages

This commit is contained in:
Miha Mencin 2019-10-09 17:17:33 +02:00 committed by GitHub
parent e6e94d5784
commit 2ef095b003
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(