mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
FIX: Don't error CleanUpInactiveUserJob when user is missing (#8362)
This commit is contained in:
parent
7d389df5e7
commit
975165f25f
@ -30,7 +30,8 @@ module Jobs
|
||||
User.transaction do
|
||||
ids.each do |id|
|
||||
begin
|
||||
user = User.find(id)
|
||||
user = User.find_by(id: id)
|
||||
next unless user
|
||||
destroyer.destroy(user, transaction: false, context: I18n.t("user.destroy_reasons.inactive_user"))
|
||||
rescue => e
|
||||
Discourse.handle_job_exception(e,
|
||||
|
Loading…
Reference in New Issue
Block a user