Skip to content

A platform for community discussion. Free, open, simple.

FIX: use correct post object when logging exception

Arpit Jalanbb67ca9d21fc
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