mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-31 09:09:53 -04:00
FIX: when missing a static topic we were returning an error
This commit is contained in:
parent
97f03e699d
commit
9787cb07aa
1 changed files with 1 additions and 1 deletions
|
@ -28,8 +28,8 @@ class StaticController < ApplicationController
|
|||
|
||||
if map.has_key?(@page)
|
||||
@topic = Topic.find_by_id(SiteSetting.send(map[@page][:topic_id]))
|
||||
@title = @topic.title
|
||||
raise Discourse::NotFound unless @topic
|
||||
@title = @topic.title
|
||||
@body = @topic.posts.first.cooked
|
||||
@faq_overriden = !SiteSetting.faq_url.blank?
|
||||
render :show, layout: !request.xhr?, formats: [:html]
|
||||
|
|
Loading…
Add table
Reference in a new issue