FIX: when missing a static topic we were returning an error

This commit is contained in:
Sam Saffron 2015-06-01 11:40:52 +10:00
parent 97f03e699d
commit 9787cb07aa
1 changed files with 1 additions and 1 deletions

View File

@ -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]