Error while loading list DMSF #1352

This commit is contained in:
Karel Pičman 2022-06-15 16:09:26 +02:00
parent 3cc89a9442
commit fc5488b7da
2 changed files with 6 additions and 2 deletions

View File

@ -55,6 +55,7 @@ end
if Redmine::Plugin.installed?(:easy_extensions)
RedmineExtensions::PatchManager.register_patch_to_be_first 'Redmine::Notifiable',
'RedmineDmsf::Patches::NotifiablePatch', prepend: true, first: true
else
elsif(!(RedmineDmsf::Plugin.present?(:redmine_questions) || Redmine::Plugin.installed?(:redmine_contacts) ||
Redmine::Plugin.installed?(:redmine_checklist)))
Redmine::Notifiable.prepend RedmineDmsf::Patches::NotifiablePatch
end

View File

@ -54,4 +54,7 @@ module RedmineDmsf
end
# Apply the patch
Redmine::Notifiable.send :include, RedmineDmsf::Patches::NotifiableRuPatch
if (RedmineDmsf::Plugin.present?(:redmine_questions) || Redmine::Plugin.installed?(:redmine_contacts) ||
Redmine::Plugin.installed?(:redmine_checklist)) && !Redmine::Plugin.installed?(:easy_extensions)
Redmine::Notifiable.send :include, RedmineDmsf::Patches::NotifiableRuPatch
end