diff --git a/decidim-core/app/helpers/concerns/decidim/user_role_checker.rb b/decidim-core/app/helpers/concerns/decidim/user_role_checker.rb index 9eb836bb9d2ce..d55dd9ea45c2a 100644 --- a/decidim-core/app/helpers/concerns/decidim/user_role_checker.rb +++ b/decidim-core/app/helpers/concerns/decidim/user_role_checker.rb @@ -30,12 +30,9 @@ def participatory_process_user_role?(user, participatory_process = nil) def assembly_user_role?(user, assembly = nil) return false unless Decidim.module_installed?(:assemblies) + return false unless assembly.is_a?(Decidim::Assembly) - if assembly.is_a?(Decidim::Assembly) - Decidim::AssemblyUserRole.exists?(user:, assembly:) - else - Decidim::AssemblyUserRole.exists?(user:) - end + Decidim::AssemblyUserRole.exists?(user:, assembly:) end def conference_user_role?(user, conference = nil)