fix(notify): init topic action and resource (#22478)

This commit is contained in:
屈轩
2025-05-02 13:31:35 +08:00
committed by GitHub
parent d22dcecbca
commit 4b77e1f4a7
+3 -1
View File
@@ -391,7 +391,9 @@ func (sm *STopicManager) InitializeData() error {
return errors.Wrapf(err, "unable to update topic %s", topic.Name)
}
}
if isNew {
acnt := TopicActionManager.Query().Equals("topic_id", topic.Id).Count()
rcnt := TopicResourceManager.Query().Equals("topic_id", topic.Id).Count()
if isNew || acnt == 0 || rcnt == 0 {
initTopicElement(name, t)
}
}