From 561238ec8a26f39f5a1a7638345dec04abe5d465 Mon Sep 17 00:00:00 2001 From: Gregor Billing Date: Thu, 9 Jan 2025 22:50:20 +0900 Subject: [PATCH] Circumvent cache in WIC->Ethics sync --- app/jobs/sync_mailing_lists_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/sync_mailing_lists_job.rb b/app/jobs/sync_mailing_lists_job.rb index 6243d06a3db..e845947d909 100644 --- a/app/jobs/sync_mailing_lists_job.rb +++ b/app/jobs/sync_mailing_lists_job.rb @@ -35,7 +35,7 @@ def perform # Special case: WIC is the first committee in our (recent) history that "absorbed" another team's duties: # They are now a "mix" of WDC and WEC. The structures have been mapped so that WIC reuses WDC's groups, # so they get WDC access "for free". But they _also_ need to be synced to ethics@ to view old conversations from there. - GsuiteMailingLists.sync_group("ethics@worldcubeassociation.org", GroupsMetadataTeamsCommittees.wic.user_group.active_users.map(&:email)) + GsuiteMailingLists.sync_group("ethics@worldcubeassociation.org", GroupsMetadataTeamsCommittees.wic.user_group.active_users.pluck(:email)) treasurers = UserGroup.officers.flat_map(&:active_roles).filter { |role| role.metadata.status == RolesMetadataOfficers.statuses[:treasurer] } GsuiteMailingLists.sync_group("treasurer@worldcubeassociation.org", treasurers.map(&:user).map(&:email))