From 7b9475cf504912c8d0a6aff2a7b0027a0e4493a6 Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Thu, 22 Mar 2018 16:37:12 +0100 Subject: [PATCH] Fix for test cases --- lib/redmine_dmsf/hooks/views/issue_view_hooks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb b/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb index ed1f31eb..35f461e6 100644 --- a/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb +++ b/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb @@ -100,7 +100,7 @@ module RedmineDmsf private def allowed_to_attach_documents(container) - container && + container && container.respond_to?(:saved_dmsf_attachments) && container.project && User.current.allowed_to?(:file_manipulation, container.project) && Setting.plugin_redmine_dmsf['dmsf_act_as_attachable'] && (container.project.dmsf_act_as_attachable == Project::ATTACHABLE_DMS_AND_ATTACHMENTS)