mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-08 22:24:23 +08:00
refactor code
This commit is contained in:
parent
d146970f6b
commit
779b713148
1 changed files with 1 additions and 5 deletions
|
@ -555,11 +555,7 @@ class Experiment < ActiveRecord::Base
|
|||
# Generates workflow img when the workflow or module is moved
|
||||
# to other experiment
|
||||
def generate_workflow_img_for_moved_modules(to_move)
|
||||
experiment_ids = []
|
||||
to_move.each_value do |id|
|
||||
experiment_ids << id
|
||||
end
|
||||
experiment_ids.uniq.each do |id|
|
||||
to_move.values.uniq.each do |id|
|
||||
experiment = Experiment.find_by_id(id)
|
||||
next unless experiment
|
||||
experiment.delay.generate_workflow_img
|
||||
|
|
Loading…
Add table
Reference in a new issue