Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/sempy_labs/_helper_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def language_validate(language: str):
return lang


def resolve_workspace_name_and_id(workspace: Optional[str] = None) -> Tuple[str, str]:
def resolve_workspace_name_and_id(workspace: Optional[str] | Optional[uuid] = None) -> Tuple[str, str]:
"""
Obtains the name and ID of the Fabric workspace.

Expand All @@ -564,6 +564,10 @@ def resolve_workspace_name_and_id(workspace: Optional[str] = None) -> Tuple[str,
if workspace is None:
workspace_id = fabric.get_workspace_id()
workspace = fabric.resolve_workspace_name(workspace_id)
# Workspace Id
if len(workspace) == 36 and all(workspace[i] == '-' for i in [8, 13, 18, 23]):
workspace_id = workspace
workspace = fabric.resolve_workspace_name(workspace_id)
else:
workspace_id = fabric.resolve_workspace_id(workspace)

Expand Down
Loading