summaryrefslogtreecommitdiffstats
path: root/app/controllers/versions_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-06-27 09:02:24 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-06-27 09:02:24 +0000
commitbc9ca5fcfd74ea699ea816aaf9e38edadd37b784 (patch)
tree34714c20aeeb5b6e252909f06b18e111a3ae209f /app/controllers/versions_controller.rb
parent5b1fb525b81583c874991991ba00ed946719974f (diff)
downloadredmine-bc9ca5fcfd74ea699ea816aaf9e38edadd37b784.tar.gz
redmine-bc9ca5fcfd74ea699ea816aaf9e38edadd37b784.zip
Disallow users to delete a version referenced by a custom field (#20159).
git-svn-id: http://svn.redmine.org/redmine/trunk@14376 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/versions_controller.rb')
-rw-r--r--app/controllers/versions_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb
index 37de29df8..e6b1fec89 100644
--- a/app/controllers/versions_controller.rb
+++ b/app/controllers/versions_controller.rb
@@ -146,7 +146,7 @@ class VersionsController < ApplicationController
end
def destroy
- if @version.fixed_issues.empty?
+ if @version.deletable?
@version.destroy
respond_to do |format|
format.html { redirect_back_or_default settings_project_path(@project, :tab => 'versions') }