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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user