Don't panic when multiple Zed instances are open (#10295)

This stops an annoying panic that can occur when developing Zed 

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki authored and GitHub committed 2024-04-08 12:26:38 -07:00
1 parent ea6df4a582
commit ea3c1f3dce
1 file changed
+1 -2
+1 -2
View File
@@ -352,8 +352,7 @@ impl WorkspaceDb {
// Clear out panes and pane_groups
conn.exec_bound(sql!(
DELETE FROM pane_groups WHERE workspace_id = ?1;
DELETE FROM panes WHERE workspace_id = ?1;))?(workspace.id)
.expect("Clearing old panes");
DELETE FROM panes WHERE workspace_id = ?1;))?(workspace.id)?;
conn.exec_bound(sql!(
DELETE FROM workspaces WHERE workspace_location = ? AND workspace_id != ?