mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
don't error out on not posts if its a json request
This commit is contained in:
parent
fc57578c85
commit
a3dce9afd7
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ class TopicsController < ApplicationController
|
|||
opts = params.slice(:username_filters, :best_of, :page, :post_number, :posts_before, :posts_after, :best)
|
||||
@topic_view = TopicView.new(params[:id] || params[:topic_id], current_user, opts)
|
||||
|
||||
raise Discourse::NotFound unless @topic_view.posts.present?
|
||||
raise Discourse::NotFound unless @topic_view.posts.present? || (request.format && request.format.json?)
|
||||
|
||||
anonymous_etag(@topic_view.topic) do
|
||||
redirect_to_correct_topic && return if slugs_do_not_match
|
||||
|
|
Loading…
Reference in a new issue