fix: Fix the problem of failed creation of child node snapshots (#8898)

Refs #8897
This commit is contained in:
ssongliu
2025-06-03 14:52:49 +00:00
committed by GitHub
parent a7ec06e066
commit 7bc2bbc1d7
+1 -5
View File
@@ -268,11 +268,7 @@ func loadDbConn(snap *snapHelper, targetDir string, req dto.SnapshotCreate) erro
_ = taskDB.Where("id = ?", req.TaskID).Delete(&model.Task{}).Error
}
if !req.WithOperationLog {
err = snap.snapCoreDB.Exec("DELETE FROM operation_logs").Error
snap.Task.LogWithStatus(i18n.GetMsgByKey("SnapDeleteOperationLog"), err)
if err != nil {
return err
}
_ = snap.snapCoreDB.Exec("DELETE FROM operation_logs").Error
}
if !req.WithLoginLog {
err = snap.snapCoreDB.Exec("DELETE FROM login_logs").Error