Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 592c882

Browse filesBrowse files
committed
Merge branch '199-reset-clones' into 'v2.0'
fix: do not reset the clone and do not change the clone status if it is not started yet (#199) See merge request postgres-ai/database-lab!204
2 parents e0dacf9 + d560388 commit 592c882
Copy full SHA for 592c882

File tree

1 file changed

+4
-4
lines changed
Filter options

1 file changed

+4
-4
lines changed

‎pkg/services/cloning/mode_base.go

Copy file name to clipboardExpand all lines: pkg/services/cloning/mode_base.go
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.