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.rbindex 42434c7375a..61af4c4b363 100644--- a/app/models/post.rb+++ b/app/models/post.rb@@ -530,7 +530,7 @@ class Post < ActiveRecord::Baseif attempts > 3post.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")elsepost.custom_fields["rebake_attempts"] = attempts + 1post.save_custom_fields