Commit 2144ffdc authored by jboyson's avatar jboyson

Fix: only redirect on success

Also no need to reset project anymore
parent d91bac2a
...@@ -92,12 +92,12 @@ class ProjectsController < Projects::ApplicationController ...@@ -92,12 +92,12 @@ class ProjectsController < Projects::ApplicationController
if result[:status] == :success if result[:status] == :success
flash[:notice] = _("Project '%{project_name}' was successfully updated.") % { project_name: @project.name } flash[:notice] = _("Project '%{project_name}' was successfully updated.") % { project_name: @project.name }
redirect_to(edit_project_path(@project, anchor: 'js-general-project-settings'))
else else
flash[:alert] = result[:message] flash[:alert] = result[:message]
@project.reset render 'edit'
end end
redirect_to(edit_project_path(@project, anchor: 'js-general-project-settings'))
end end
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment