mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-25 16:04:22 -05:00
FIX: can delete category if topic_count < 0
This commit is contained in:
parent
104b39540a
commit
05d2083796
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ module CategoryGuardian
|
||||||
|
|
||||||
def can_delete_category?(category)
|
def can_delete_category?(category)
|
||||||
can_edit_category?(category) &&
|
can_edit_category?(category) &&
|
||||||
category.topic_count == 0 &&
|
category.topic_count <= 0 &&
|
||||||
!category.uncategorized? &&
|
!category.uncategorized? &&
|
||||||
!category.has_children?
|
!category.has_children?
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue