mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
FIX: If the user can't be found to award a badge, skip them
This commit is contained in:
parent
976056bc41
commit
a26bd2c549
@ -30,7 +30,8 @@ module Jobs
|
||||
|
||||
badge = Badge.find(Badge::FirstOnebox)
|
||||
to_award.each do |user_id, opts|
|
||||
BadgeGranter.grant(badge, User.find(user_id), opts)
|
||||
user = User.where(id: user_id).first
|
||||
BadgeGranter.grant(badge, user, opts) if user
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user