mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(notify): init robot correctly from old data
This commit is contained in:
@@ -65,7 +65,7 @@ func (rm *SRobotManager) InitializeData() error {
|
||||
if len(configs) == 0 {
|
||||
return nil
|
||||
}
|
||||
robots := make([]SRobot, len(configs))
|
||||
robots := make([]SRobot, 0, len(configs))
|
||||
for i := range configs {
|
||||
webhook, _ := configs[i].Content.GetString("webhook")
|
||||
robot := SRobot{
|
||||
@@ -96,6 +96,8 @@ func (rm *SRobotManager) InitializeData() error {
|
||||
robots = append(robots, robotn)
|
||||
}
|
||||
robot.Address = addresses[0]
|
||||
default:
|
||||
continue
|
||||
}
|
||||
robots = append(robots, robot)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user