This commit is contained in:
Karel Pičman 2024-12-30 10:54:58 +01:00
parent 8cc664f0f7
commit 00a8817472
2 changed files with 4 additions and 3 deletions

View File

@ -158,7 +158,7 @@ module RedmineDmsf
end
# Apply the patch
if Redmine::Plugin.installed?('easy_crm')
if defined?(EasyPatchManager)
EasyPatchManager.register_model_patch 'EasyCrmCase', 'RedmineDmsf::Patches::EasyCrmCasePatch',
if: -> { EasyPluginLoader.plugin_active? 'easy_crm_2_0' }
end

View File

@ -122,8 +122,9 @@ module RedmineDmsf
end
# Apply the patch
if Redmine::Plugin.installed?('easy_crm')
if defined?(EasyPatchManager)
EasyPatchManager.register_controller_patch 'EasyCrmCasesController',
'RedmineDmsf::Patches::EasyCrmCasesControllerPatch',
prepend: true
prepend: true,
if: -> { Redmine::Plugin.installed? 'easy_crm_2_0' }
end