From 02002afd3f9cb871ca4526524cb62b6eb1b673b6 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 19 Feb 2016 17:08:08 +1100 Subject: [PATCH] clean up hack --- app/models/category_list.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/models/category_list.rb b/app/models/category_list.rb index 642a18643da..b6ffafb76af 100644 --- a/app/models/category_list.rb +++ b/app/models/category_list.rb @@ -146,9 +146,8 @@ class CategoryList def prune_empty - if @guardian.can_create?(Category) && !SiteSetting.allow_uncategorized_topics - # HACK: Don't show uncategorized to admins either, if uncategorized topics are not allowed - # and there are none. + unless SiteSetting.allow_uncategorized_topics + # HACK: Don't show uncategorized to anyone if not allowed @categories.delete_if do |c| c.uncategorized? && c.displayable_topics.blank? end