404 if a category does not exist ....

This commit is contained in:
Sam 2013-07-08 15:42:55 +10:00
parent f1a31cd9e6
commit 085e094497
1 changed files with 4 additions and 0 deletions

View File

@ -35,6 +35,10 @@ class ListController < ApplicationController
if request_is_for_uncategorized?
list = query.list_uncategorized
else
if !@category
raise Discourse::NotFound
return
end
guardian.ensure_can_see!(@category)
list = query.list_category(@category)
end