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 2024-04-08 12:26:38 -07:00 committed by GitHub
parent 7dccbd8e3b
commit cf5a113751
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -352,8 +352,7 @@ impl WorkspaceDb {
// Clear out panes and pane_groups // Clear out panes and pane_groups
conn.exec_bound(sql!( conn.exec_bound(sql!(
DELETE FROM pane_groups WHERE workspace_id = ?1; DELETE FROM pane_groups WHERE workspace_id = ?1;
DELETE FROM panes WHERE workspace_id = ?1;))?(workspace.id) DELETE FROM panes WHERE workspace_id = ?1;))?(workspace.id)?;
.expect("Clearing old panes");
conn.exec_bound(sql!( conn.exec_bound(sql!(
DELETE FROM workspaces WHERE workspace_location = ? AND workspace_id != ? DELETE FROM workspaces WHERE workspace_location = ? AND workspace_id != ?