# Best way to discriminate a "About the category" post?

**URL:** https://meta.discourse.org/t/best-way-to-discriminate-a-about-the-category-post/121163
**Category:** Support
**Created:** [24 ביוני,‏ 2019,‏ 1:55pm UTC](https://meta.discourse.org/t/best-way-to-discriminate-a-about-the-category-post/121163 "2019-06-24T13:55:49Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ryancey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryancey/32/99309_2.png) [@ryancey](https://meta.discourse.org/u/ryancey)
#### Post date: [24 ביוני,‏ 2019,‏ 1:55pm UTC](https://meta.discourse.org/t/best-way-to-discriminate-a-about-the-category-post/121163/1 "2019-06-24T13:55:49Z")

</div>

I auto-create a category along with some object in my application.

Thus, when my user want to delete its object, I want to also delete the category. But before deleting a category, I must delete all the topics in it, and we can’t delete the _About the category_ topic.

Even if deleting the category is possible at this point (with only this topic in it), I’d like a way to not try to delete the _About_ post, and directly try to delete the category instead.

Does this topic has some kind of flag? Should I rely on the fact that it is created by the _system_ user (because it is — through my API client)?

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [24 ביוני,‏ 2019,‏ 2:28pm UTC](https://meta.discourse.org/t/best-way-to-discriminate-a-about-the-category-post/121163/2 "2019-06-24T14:28:25Z")

</div>

You should be able to delete a category with the `About the category` topic still in existence. All other topics need to be deleted. The `about` topic needs to exist as it serves as the category description.

---

<div class="post-metadata">

### Author: ![ryancey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryancey/32/99309_2.png) [@ryancey](https://meta.discourse.org/u/ryancey)
#### Post date: [24 ביוני,‏ 2019,‏ 10:21pm UTC](https://meta.discourse.org/t/best-way-to-discriminate-a-about-the-category-post/121163/3 "2019-06-24T22:21:09Z")

</div>

Hi Justin, thanks for the answer.

> [@ryancey](#):
>
> Even if deleting the category is possible at this point (with only this topic in it), I’d like a way to not try to delete the _About_ post, and directly try to delete the category instead.

I know that the category can be deleted, I’d just like my script to not worry when it tries to delete all topics and stumble upon _About this category_, or better, that it doesn’t try to delete it. Right now I can’t differentiate wether a failed topic deletion is to be considered as a problem or just normal because it’s the _About_ topic 🙂

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [24 ביוני,‏ 2019,‏ 10:58pm UTC](https://meta.discourse.org/t/best-way-to-discriminate-a-about-the-category-post/121163/4 "2019-06-24T22:58:11Z")

</div>

You can compare the category topic id on the category model to the topic id and just exclude the matches.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [10 בדצמבר,‏ 2022,‏ 9:19am UTC](https://meta.discourse.org/t/best-way-to-discriminate-a-about-the-category-post/121163/5 "2022-12-10T09:19:55Z")

</div>



---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [10 בדצמבר,‏ 2022,‏ 12:39pm UTC](https://meta.discourse.org/t/best-way-to-discriminate-a-about-the-category-post/121163/6 "2022-12-10T12:39:20Z")

</div>


