FIX: Ensure topic exists before making a banner. (#7781)

This commit is contained in:
Bianca Nenciu
2019-06-25 13:49:29 +03:00
committed by GitHub
parent 3fd7cf9038
commit 557805249d
2 changed files with 8 additions and 1 deletions

View File

@@ -174,6 +174,6 @@ module TopicGuardian
end
def can_banner_topic?(topic)
authenticated? && !topic.private_message? && is_staff?
topic && authenticated? && !topic.private_message? && is_staff?
end
end