From 14a8b3e29c4600dcceb59b1e1fe3feb01ea332cf Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 3 Feb 2015 14:51:29 -0500 Subject: [PATCH] FIX: In case a topic is deleted, allow us to serialize their posts --- lib/guardian/post_guardian.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/guardian/post_guardian.rb b/lib/guardian/post_guardian.rb index 154f8c8c67..4e6c579540 100644 --- a/lib/guardian/post_guardian.rb +++ b/lib/guardian/post_guardian.rb @@ -20,7 +20,7 @@ module PostGuardian not(is_flag || already_taken_this_action) && # nothing except flagging on archived topics - not(post.topic.archived?) && + not(post.topic.try(:archived?)) && # nothing except flagging on deleted posts not(post.trashed?) &&