Don't list subcategories when creating a new category.

This commit is contained in:
Robin Ward 2014-02-03 16:26:36 -05:00
parent 1b66876c08
commit 3bc821aff5
1 changed files with 1 additions and 0 deletions

View File

@ -22,6 +22,7 @@ Discourse.EditCategoryController = Discourse.ObjectController.extend(Discourse.M
// We can change the parent if there are no children
subCategories: function() {
if (Em.isEmpty(this.get('id'))) { return null; }
return Discourse.Category.list().filterBy('parent_category_id', this.get('id'));
}.property('model.id'),