Merge branch 'devel-2.4.5' of github.com:danmunn/redmine_dmsf into devel-2.4.5

This commit is contained in:
karel.picman@lbcfree.net 2020-11-06 10:50:24 +01:00
commit 087c9c26a0
2 changed files with 7 additions and 2 deletions

View File

@ -238,7 +238,7 @@ You can either clone the master branch or download the latest zipped version. Be
`RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=redmine_dmsf`
5. The access rights must be set for web server, example: `chown -R www-data:www-data plugins/redmine_dmsf`.
6. Restart the web server, e.g. `systemctl apache2 restart`
6. Restart the web server, e.g. `systemctl restart apache2`
7. You should configure the plugin via Redmine interface: Administration -> Plugins -> DMSF -> Configure.
8. Don't forget to grant permissions for DMSF in Administration -> Roles and permissions
9. Assign DMSF permissions to appropriate roles.

View File

@ -70,7 +70,12 @@ class DmsfUploadController < ApplicationController
if defined?(EasyExtensions)
@attachment.skip_description_required = true
end
saved = @attachment.save
begin
Attachment.skip_callback(:commit, :after, :reuse_existing_file_if_possible)
saved = @attachment.save
ensure
Attachment.set_callback(:commit, :after, :reuse_existing_file_if_possible)
end
respond_to do |format|
format.js