mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 19:05:51 +01:00
Do not raise an error when destroying a Version with assigned issues.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3668 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -80,11 +80,13 @@ class VersionsController < ApplicationController
|
||||
end
|
||||
|
||||
def destroy
|
||||
@version.destroy
|
||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
|
||||
rescue
|
||||
flash[:error] = l(:notice_unable_delete_version)
|
||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
|
||||
if @version.fixed_issues.empty?
|
||||
@version.destroy
|
||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
|
||||
else
|
||||
flash[:error] = l(:notice_unable_delete_version)
|
||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
|
||||
end
|
||||
end
|
||||
|
||||
def status_by
|
||||
|
||||
Reference in New Issue
Block a user