mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 19:08:10 -05:00
Don't list subcategories when creating a new category.
This commit is contained in:
parent
1b66876c08
commit
3bc821aff5
1 changed files with 1 additions and 0 deletions
|
@ -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 a new issue