Skip to content

Commit 91fa2b3

Browse files
authored
TargetWorkspaceSelectorWidget Fix (SeequentEvo#167)
<!-- Thank you for taking the time to make a pull request. Please review our [contribution guide](https://github.com/SeequentEvo/evo-python-sdk/blob/main/CONTRIBUTING.md) and our [code of conduct](https://github.com/SeequentEvo/evo-python-sdk/blob/main/CONTRIBUTING.md) before opening your first pull request. --> ## Description A simple fix to display the appropriate selected source workspace name under TargetWorkspaceSelectorWidget. ## Checklist - [x] I have read the contributing guide and the code of conduct
1 parent 75d0202 commit 91fa2b3

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

samples/workspaces/bonus/workspace_utils.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,13 @@ class TargetWorkspaceSelectorWidget:
218218

219219
def __init__(self, manager_widget):
220220
self.manager_widget = manager_widget
221-
self.current_workspace_id = manager_widget.workspaces[0].id if manager_widget.workspaces else None
221+
# Get the selected workspace ID
222+
selected_id = manager_widget._workspace_selector.selected
223+
224+
if selected_id != manager_widget._workspace_selector.UNSELECTED[1]:
225+
self.current_workspace_id = selected_id
226+
else:
227+
raise ValueError("No source workspace is currently selected.")
222228

223229
# Create widgets
224230
self.refresh_btn = widgets.Button(

0 commit comments

Comments
 (0)