Merge pull request #13031 from rainzm/email/delete_config

fix(notify): real delete for email and mobile
This commit is contained in:
Zexi Li
2021-12-27 12:14:01 +08:00
committed by GitHub
@@ -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
}