FIX: If a topic is deleted, allow the staff note to link to it anyway
This commit is contained in:
parent
70b417272a
commit
ed3e0a4157
|
@ -107,7 +107,14 @@ after_initialize do
|
||||||
end
|
end
|
||||||
|
|
||||||
def post_url
|
def post_url
|
||||||
object[:post].try(:url)
|
url = object[:post].try(:url)
|
||||||
|
|
||||||
|
# In case the topic is deleted
|
||||||
|
if url == "/404"
|
||||||
|
url = "/t/#{object[:post].topic_id}/#{object[:post].post_number}"
|
||||||
|
end
|
||||||
|
|
||||||
|
url
|
||||||
end
|
end
|
||||||
|
|
||||||
def post_title
|
def post_title
|
||||||
|
|
Loading…
Reference in New Issue