From 8ede83b2179488e0a28101033e8ce9e6978ea849 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Sun, 20 Sep 2020 18:25:42 -0500 Subject: [Admin] Do not deliver pending account notifications to service accounts --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/user.rb') diff --git a/app/models/user.rb b/app/models/user.rb index 07a4c9ab8..bb7fd4da5 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -435,7 +435,7 @@ class User < ApplicationRecord def notify_staff_about_pending_account! User.staff.includes(:account).find_each do |u| - next unless u.allows_pending_account_emails? + next unless u.account.actor_type == 'Person' && u.allows_pending_account_emails? AdminMailer.new_pending_account(u.account, self).deliver_later end end -- cgit