From 632ca42db9e358b41a232b9aff44de2bf00dbf5e Mon Sep 17 00:00:00 2001 From: Jeff Wong Date: Wed, 3 Oct 2018 18:34:47 -0700 Subject: [PATCH] FIX: edit checks for editing posts with no topic --- 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 c58ffff15c3..dd7504fa70d 100644 --- a/lib/guardian/post_guardian.rb +++ b/lib/guardian/post_guardian.rb @@ -134,7 +134,7 @@ module PostGuardian ) ) - if post.topic.archived? || post.user_deleted || post.deleted_at + if post.topic&.archived? || post.user_deleted || post.deleted_at return false end