From bb67ca9d21fc0871ea545e5ffb551cac4c20e4dd Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Wed, 19 Dec 2018 22:17:37 +0530 Subject: [PATCH] FIX: use correct post object when logging exception --- app/models/post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/post.rb b/app/models/post.rb index 42434c7375a..61af4c4b363 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -530,7 +530,7 @@ class Post < ActiveRecord::Base if attempts > 3 post.update_columns(baked_version: BAKED_VERSION) - Discourse.warn_exception(e, message: "Can not rebake post# #{p.id} after 3 attempts, giving up") + Discourse.warn_exception(e, message: "Can not rebake post# #{post.id} after 3 attempts, giving up") else post.custom_fields["rebake_attempts"] = attempts + 1 post.save_custom_fields