diff options
author | Go MAEDA <maeda@farend.jp> | 2019-03-26 11:05:20 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-03-26 11:05:20 +0000 |
commit | f0d579adebfe3c5da93135fbaa3d9ec503d06855 (patch) | |
tree | 68bc39cd66177ff0c711384335019f42f66f95cf /app/models | |
parent | 391c069d87588dfccda7b308c1a4c808611a3b65 (diff) | |
download | redmine-f0d579adebfe3c5da93135fbaa3d9ec503d06855.tar.gz redmine-f0d579adebfe3c5da93135fbaa3d9ec503d06855.zip |
Fix that deleting a version silently deletes its attachments (#31087).
Patch by Karel Pičman and Takenori TAKAKI.
git-svn-id: http://svn.redmine.org/redmine/trunk@18008 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/version.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/version.rb b/app/models/version.rb index 66d1a8070..3c62580f9 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -353,7 +353,7 @@ class Version < ActiveRecord::Base end def deletable? - fixed_issues.empty? && !referenced_by_a_custom_field? + fixed_issues.empty? && !referenced_by_a_custom_field? && attachments.empty? end def default_project_version |