File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -277,17 +277,17 @@ func (c *baseCloning) ResetClone(cloneID string) error {
277
277
return models .New (models .ErrCodeNotFound , "clone not found" )
278
278
}
279
279
280
+ if w .session == nil {
281
+ return models .New (models .ErrCodeNotFound , "clone is not started yet" )
282
+ }
283
+
280
284
if err := c .updateCloneStatus (cloneID , models.Status {
281
285
Code : models .StatusResetting ,
282
286
Message : models .CloneMessageResetting ,
283
287
}); err != nil {
284
288
return errors .Wrap (err , "failed to update clone status" )
285
289
}
286
290
287
- if w .session == nil {
288
- return models .New (models .ErrCodeNotFound , "clone is not started yet" )
289
- }
290
-
291
291
go func () {
292
292
err := c .provision .ResetSession (w .session , w .snapshot .ID )
293
293
if err != nil {
You can’t perform that action at this time.
0 commit comments