fix(canvas): 画布 - 防止旧内容覆盖并支持版本历史恢复
This commit is contained in:
@@ -100,7 +100,7 @@ func (s *Service) UndoCloudAgentCanvas(userID, runID, stepID, expectedSnapshotHa
|
||||
}
|
||||
previous := canvas.PayloadJSON
|
||||
canvas.PayloadJSON = mutation.BeforeJSON
|
||||
if err := repo.CompareSaveCreationCanvas(canvas, previous); err != nil {
|
||||
if err := saveCreationCanvasWithHistory(repo, canvas, previous); err != nil {
|
||||
if errors.Is(err, repository.ErrCreationConflict) {
|
||||
return creationConflict("画布已发生后续变化,未执行撤销")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user