From e23c87c44204df8e709d6e9d3654e0da77115009 Mon Sep 17 00:00:00 2001 From: Dan Ungureanu Date: Tue, 16 Apr 2019 01:26:51 +0300 Subject: [PATCH] FIX: Prevent exception in rescue block. > Job exception: undefined method `id' for nil:NilClass > clean_up_inactive_users.rb:25:in `rescue in block in execute' --- app/jobs/scheduled/clean_up_inactive_users.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/scheduled/clean_up_inactive_users.rb b/app/jobs/scheduled/clean_up_inactive_users.rb index d79562f2a22..8bebeb21ea6 100644 --- a/app/jobs/scheduled/clean_up_inactive_users.rb +++ b/app/jobs/scheduled/clean_up_inactive_users.rb @@ -22,7 +22,7 @@ module Jobs rescue => e Discourse.handle_job_exception(e, message: "Cleaning up inactive users", - extra: { user_id: user.id } + extra: { user_id: id } ) end end