Fix workspace update cannot reset shared_network to default

Use direct assignment for shared_network to allow resetting it to
None (default behavior). The frontend always sends shared_network
in update requests, so None means "reset to default", not "don't change".
This commit is contained in:
Thomas Marchand
2026-01-17 15:47:44 +00:00
parent 49b9ea77cb
commit 4d89205844

View File

@@ -535,9 +535,8 @@ async fn update_workspace(
workspace.init_script = normalize_init_script(Some(init_script));
}
if let Some(shared_network) = req.shared_network {
workspace.shared_network = Some(shared_network);
}
// Always update shared_network to allow resetting to None (default)
workspace.shared_network = req.shared_network;
// Save the updated workspace
state.workspaces.update(workspace.clone()).await;