app/queries/decidim/conferences/admin/admin_users.rb in decidim-conferences-0.17.2 vs app/queries/decidim/conferences/admin/admin_users.rb in decidim-conferences-0.18.0

- old
+ new

@@ -21,18 +21,25 @@ # Finds organization admins and the users with role admin for the given conference. # # Returns an ActiveRecord::Relation. def query - Decidim::User.where(id: organization_admins) + Decidim::User.where(id: organization_admins).or(conference_user_admins) end private attr_reader :conference def organization_admins conference.organization.admins + end + + def conference_user_admins + conference_user_admin_ids = Decidim::ConferenceUserRole + .where(conference: conference, role: :admin) + .pluck(:decidim_user_id) + Decidim::User.where(id: conference_user_admin_ids) end end end end end