mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 13:13:22 +08:00
Fix moving experiment [SCI-6602] (#3927)
This commit is contained in:
parent
7f7bf0533a
commit
06430c9340
1 changed files with 2 additions and 1 deletions
|
@ -25,6 +25,8 @@ module Experiments
|
|||
|
||||
ActiveRecord::Base.transaction do
|
||||
@exp.project = @project
|
||||
sync_user_assignments(@exp)
|
||||
|
||||
@exp.my_modules.each do |my_module|
|
||||
unless can_move_my_module?(@user, my_module)
|
||||
@errors[:main] = I18n.t('move_to_project_service.my_modules_permission_error')
|
||||
|
@ -37,7 +39,6 @@ module Experiments
|
|||
|
||||
move_activities!(@exp)
|
||||
@exp.save!
|
||||
sync_user_assignments(@exp)
|
||||
rescue StandardError
|
||||
if @exp.valid? && @errors.none?
|
||||
@errors[:main] = I18n.t('move_to_project_service.general_error')
|
||||
|
|
Loading…
Reference in a new issue