mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 18:22:40 +08:00
FIX: Don't raise an exception if we can't update the user on demotion
This is causing issues when purging old users, if they are set up in the exact condition where they will be demoted into another group, but also do not have a primary email.
This commit is contained in:
@ -126,8 +126,8 @@ class Promotion
|
||||
# Then consider the group locked level
|
||||
user_group_granted_trust_level = user.group_granted_trust_level
|
||||
|
||||
unless user_group_granted_trust_level.blank?
|
||||
return user.update!(
|
||||
if user_group_granted_trust_level.present?
|
||||
return user.update(
|
||||
trust_level: user_group_granted_trust_level
|
||||
)
|
||||
end
|
||||
|
Reference in New Issue
Block a user