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 {
277277 return models .New (models .ErrCodeNotFound , "clone not found" )
278278 }
279279
280+ if w .session == nil {
281+ return models .New (models .ErrCodeNotFound , "clone is not started yet" )
282+ }
283+
280284 if err := c .updateCloneStatus (cloneID , models.Status {
281285 Code : models .StatusResetting ,
282286 Message : models .CloneMessageResetting ,
283287 }); err != nil {
284288 return errors .Wrap (err , "failed to update clone status" )
285289 }
286290
287- if w .session == nil {
288- return models .New (models .ErrCodeNotFound , "clone is not started yet" )
289- }
290-
291291 go func () {
292292 err := c .provision .ResetSession (w .session , w .snapshot .ID )
293293 if err != nil {
You can’t perform that action at this time.
0 commit comments