# 删除主题后重新使用 \`external\_id\`

**URL:** <https://meta.discourse.org/t/re-use-of-external-id-after-a-topic-is-deleted/237550>\
**Category:** Product Support\
**Created:** [2022 年8 月 30 日 07:20 UTC](https://meta.discourse.org/t/re-use-of-external-id-after-a-topic-is-deleted/237550 "2022-08-30T07:20:20Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

作者： ![george\_m](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/george_m/32/272202_2.png) [@george\_m](https://meta.discourse.org/u/george_m)\
发布日期： [2022 年8 月 30 日 12:41 UTC](https://meta.discourse.org/t/re-use-of-external-id-after-a-topic-is-deleted/237550/5 "2022-08-30T12:41:54Z")

</div>

挑战在于，我们用于 Topic 的 external\_id 值由于我们正在集成的应用程序（CatalogIt - 提供只读 API）的限制而难以更改（手动操作）。我们在开发过程中经常手动删除并自动重新创建 Topic（这是集成所做的全部工作——当用户单击“讨论此项目”链接时，为 CatalogIt 中的项目创建讨论主题），这迫使我们每次都更改此值。如果在删除 Topic 后未更改该值，并且用户稍后单击“讨论此项目”链接，我们将遇到“external already taken”错误。

也许归档而不是删除是更好的主意，或者也许有一个隐藏/取消隐藏机制我们可以利用。我对 Discourse 不熟悉，需要做一些研究，我会深入研究并看看能找到什么。

---

_[View the full topic](https://meta.discourse.org/t/re-use-of-external-id-after-a-topic-is-deleted/237550)._
