Don't list subcategories when creating a new category.
This commit is contained in:
parent
1b66876c08
commit
3bc821aff5
|
@ -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'),
|
||||
|
||||
|
|
Loading…
Reference in New Issue