From b97b273af0308b855d298e576bb2f0f29e608d81 Mon Sep 17 00:00:00 2001 From: Antti Hukkanen Date: Mon, 17 Jun 2024 11:01:57 +0300 Subject: [PATCH] Consider not all modules might be installed --- lib/decidim/locations/engine.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/decidim/locations/engine.rb b/lib/decidim/locations/engine.rb index 4486b9d..6136772 100644 --- a/lib/decidim/locations/engine.rb +++ b/lib/decidim/locations/engine.rb @@ -19,10 +19,10 @@ class Engine < ::Rails::Engine Decidim::Admin::SettingsHelper.include(Decidim::Locations::SettingsHelperExtensions) # Lib - Decidim::Proposals::ProposalsType.include(Decidim::Locations::ProposalsTypeExtensions) - Decidim::Meetings::MeetingsType.include(Decidim::Locations::MeetingsTypeExtensions) - Decidim::Accountability::AccountabilityType.include(Decidim::Locations::AccountabilityTypeExtensions) - Decidim::Surveys::SurveysType.include(Decidim::Locations::SurveysTypeExtensions) + Decidim::Proposals::ProposalsType.include(Decidim::Locations::ProposalsTypeExtensions) if Decidim.module_installed?(:proposals) + Decidim::Meetings::MeetingsType.include(Decidim::Locations::MeetingsTypeExtensions) if Decidim.module_installed?(:meetings) + Decidim::Accountability::AccountabilityType.include(Decidim::Locations::AccountabilityTypeExtensions) if Decidim.module_installed?(:accountability) + Decidim::Surveys::SurveysType.include(Decidim::Locations::SurveysTypeExtensions) if Decidim.module_installed?(:surveys) end end