Merge pull request #90 from ZmagoD/zd_SCI_376

fixes cloned experiment protocol [fixes SCI-376]
This commit is contained in:
Zmago Devetak 2016-08-24 14:12:19 +02:00 committed by GitHub
commit 0de7ea31ea
2 changed files with 8 additions and 1 deletions

View file

@ -312,6 +312,13 @@ class MyModule < ActiveRecord::Base
clone.protocols << self.protocol.deep_clone_my_module(self, current_user)
clone.reload
# fixes linked protocols
clone.protocols.each do |protocol|
next unless protocol.linked?
protocol.updated_at = protocol.parent_updated_at
protocol.save
end
return clone
end

View file

@ -144,4 +144,4 @@
</ul>
<% end %>
<% end %>
</div>
</div>