Let's not notify for trust levels on Staff, either

This commit is contained in:
Robin Ward 2017-01-11 11:25:04 -05:00
parent 3a3a464a32
commit 6c3426d266

View File

@ -274,7 +274,7 @@ class BadgeGranter
/*where*/
RETURNING id, user_id, granted_at
)
select w.*, username, locale, u.admin FROM w
select w.*, username, locale, (u.admin OR u.moderator) AS staff FROM w
JOIN users u on u.id = w.user_id
"
@ -315,7 +315,7 @@ class BadgeGranter
# Make this variable in this scope
notification = nil
next if (row.admin && badge.awarded_for_trust_level?)
next if (row.staff && badge.awarded_for_trust_level?)
I18n.with_locale(notification_locale) do
notification = Notification.create!(