diff --git a/plugin.rb b/plugin.rb index ba8c9e1e..b7b239c8 100644 --- a/plugin.rb +++ b/plugin.rb @@ -873,8 +873,7 @@ module ::DiscourseAssign end on(:group_destroyed) do |group, user_ids| - user_ids.each do |user_id| - user = User.find(user_id) + User.where(id: user_ids).find_each do |user| user.notifications.for_assignment(group.assignments.select(:id)).destroy_all if user end