mirror of
https://github.com/discourse/discourse.git
synced 2025-03-21 15:19:46 +08:00
posts with no url should return a 404
This commit is contained in:
parent
267d8be1f5
commit
75b4972682
@ -340,7 +340,11 @@ class Post < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def url
|
||||
Post.url(topic.slug, topic.id, post_number)
|
||||
if topic
|
||||
Post.url(topic.slug, topic.id, post_number)
|
||||
else
|
||||
"/404"
|
||||
end
|
||||
end
|
||||
|
||||
def self.url(slug, topic_id, post_number)
|
||||
|
Loading…
x
Reference in New Issue
Block a user