FIX: when missing a static topic we were returning an error
This commit is contained in:
parent
97f03e699d
commit
9787cb07aa
|
@ -28,8 +28,8 @@ class StaticController < ApplicationController
|
||||||
|
|
||||||
if map.has_key?(@page)
|
if map.has_key?(@page)
|
||||||
@topic = Topic.find_by_id(SiteSetting.send(map[@page][:topic_id]))
|
@topic = Topic.find_by_id(SiteSetting.send(map[@page][:topic_id]))
|
||||||
@title = @topic.title
|
|
||||||
raise Discourse::NotFound unless @topic
|
raise Discourse::NotFound unless @topic
|
||||||
|
@title = @topic.title
|
||||||
@body = @topic.posts.first.cooked
|
@body = @topic.posts.first.cooked
|
||||||
@faq_overriden = !SiteSetting.faq_url.blank?
|
@faq_overriden = !SiteSetting.faq_url.blank?
|
||||||
render :show, layout: !request.xhr?, formats: [:html]
|
render :show, layout: !request.xhr?, formats: [:html]
|
||||||
|
|
Loading…
Reference in New Issue