FIX: Do not validate email in TL promotion (#20892)

There is no need to validate the user's emails when
promoting/demoting their trust level, this can cause
issues in things like Jobs::Tl3Promotions, we don't
need to fail in that case when all we are doing is changing
trust level.
This commit is contained in:
Martin Brennan
2023-03-30 13:52:10 +10:00
committed by GitHub
parent 795e6d72a4
commit 84ff96bd07
4 changed files with 30 additions and 1 deletions

View File

@ -82,6 +82,7 @@ class Promotion
new_value: new_level,
)
end
@user.skip_email_validation = true
@user.save!
@user.user_profile.recook_bio
@user.user_profile.save!