mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
fix(notify): init topic action and resource (#22478)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user