mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-05 22:44:22 +08:00
fixes restore experiment error [fixes SCI-464]
This commit is contained in:
parent
57563b9a18
commit
bf8e2a208f
2 changed files with 9 additions and 0 deletions
|
@ -76,16 +76,24 @@ class ExperimentsController < ApplicationController
|
|||
@experiment.touch(:workflowimg_updated_at)
|
||||
flash[:success] = t('experiments.update.success_flash',
|
||||
experiment: @experiment.name)
|
||||
|
||||
respond_to do |format|
|
||||
format.json do
|
||||
render json: {}, status: :ok
|
||||
end
|
||||
format.html do
|
||||
redirect_to project_path(@experiment.project)
|
||||
end
|
||||
end
|
||||
else
|
||||
flash[:alert] = t('experiments.archive.restore_flash')
|
||||
respond_to do |format|
|
||||
format.json do
|
||||
render json: @experiment.errors, status: :unprocessable_entity
|
||||
end
|
||||
format.html do
|
||||
redirect_to :back
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -631,6 +631,7 @@ en:
|
|||
success_flash: "Successfully archived experiment %{experiment}"
|
||||
error_flash: 'Could not archive the experiment.'
|
||||
label_title: 'Archive'
|
||||
restore_flash: 'Something went wrong try to restore the experiment later'
|
||||
clone:
|
||||
modal_title: 'Clone experiment %{experiment}'
|
||||
label_title: 'Clone'
|
||||
|
|
Loading…
Reference in a new issue