mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 16:24:55 +00:00
BUGFIX: 500 error on missing category
This commit is contained in:
parent
f8b7f0d73f
commit
97ae43126b
@ -252,11 +252,10 @@ class ListController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
@category = Category.query_category(slug_or_id, parent_category_id)
|
@category = Category.query_category(slug_or_id, parent_category_id)
|
||||||
|
raise Discourse::NotFound.new if !@category
|
||||||
|
|
||||||
@description_meta = @category.description
|
@description_meta = @category.description
|
||||||
|
|
||||||
guardian.ensure_can_see!(@category)
|
guardian.ensure_can_see!(@category)
|
||||||
|
|
||||||
raise Discourse::NotFound.new if @category.blank?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_topic_list_options
|
def build_topic_list_options
|
||||||
|
Loading…
x
Reference in New Issue
Block a user