Fix error on flag/appeal page if a post is expunged

This commit is contained in:
Toks
2015-06-20 12:50:57 -04:00
parent 29a7b51fcb
commit b60098044b

View File

@@ -2,6 +2,10 @@ class PostPresenter < Presenter
attr_reader :pool, :next_post_in_pool
def self.preview(post, options = {})
if post.nil?
return "Expunged"
end
if post.is_deleted? && options[:tags] !~ /status:(?:all|any|deleted|banned)/ && !options[:raw]
return ""
end