diff --git a/app/jobs/regular/update_top_redirection.rb b/app/jobs/regular/update_top_redirection.rb index 97df9483d6..b682fe924e 100644 --- a/app/jobs/regular/update_top_redirection.rb +++ b/app/jobs/regular/update_top_redirection.rb @@ -4,7 +4,9 @@ module Jobs def execute(args) user = User.find_by(id: args[:user_id]) - user.update_column(:last_redirected_to_top_at, args[:redirected_at]) + if user + user.update_column(:last_redirected_to_top_at, args[:redirected_at]) + end end end