fix(notify): real delete for email and mobile

This commit is contained in:
rainzm
2021-12-24 18:52:23 +08:00
parent b5ec683084
commit 2b3d2b4dec
@@ -59,6 +59,9 @@ func (s repullFailedReason) String() string {
func (self *RepullSuncontactTask) OnInit(ctx context.Context, obj db.IStandaloneModel, body jsonutils.JSONObject) {
config := obj.(*models.SConfig)
if !utils.IsInStringArray(config.Type, PullContactType) {
if del, _ := self.GetParams().Bool("deleted"); del {
config.RealDelete(ctx, self.GetUserCred())
}
self.SetStageComplete(ctx, nil)
return
}