Do not display the copy form when project copy is created.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3242 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
45f3199aa9
commit
9c1efcfa48
|
@ -108,6 +108,12 @@ class ProjectsController < ApplicationController
|
||||||
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
|
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
|
||||||
flash[:notice] = l(:notice_successful_create)
|
flash[:notice] = l(:notice_successful_create)
|
||||||
redirect_to :controller => 'admin', :action => 'projects'
|
redirect_to :controller => 'admin', :action => 'projects'
|
||||||
|
elsif !@project.new_record?
|
||||||
|
# Project was created
|
||||||
|
# But some objects were not copied due to validation failures
|
||||||
|
# (eg. issues from disabled trackers)
|
||||||
|
# TODO: inform about that
|
||||||
|
redirect_to :controller => 'admin', :action => 'projects'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
rescue ActiveRecord::RecordNotFound
|
rescue ActiveRecord::RecordNotFound
|
||||||
|
|
Loading…
Reference in New Issue