mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 23:16:15 +08:00
Fix moving of experiment [SCI-7734] (#4802)
This commit is contained in:
parent
c0554009d7
commit
224fb5b742
|
@ -305,12 +305,15 @@ class ExperimentsController < ApplicationController
|
|||
flash[:success] = t('experiments.move.success_flash',
|
||||
experiment: @experiment.name)
|
||||
status = :ok
|
||||
view_state = @experiment.current_view_state(current_user)
|
||||
view_type = view_state.state['my_modules']['view_type'] || 'canvas'
|
||||
path = view_mode_redirect_url(view_type)
|
||||
else
|
||||
message = service.errors.values.join(', ')
|
||||
status = :unprocessable_entity
|
||||
end
|
||||
|
||||
render json: { message: message }, status: status
|
||||
render json: { message: message, path: path }, status: status
|
||||
end
|
||||
|
||||
def move_modules_modal
|
||||
|
|
Loading…
Reference in a new issue