Skip to content

Commit 7cf6b4e

Browse files
Release cherry pick (#36342)
1 parent 6bf46ae commit 7cf6b4e

File tree

1 file changed

+10
-2
lines changed
  • sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace

1 file changed

+10
-2
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,14 @@ def _from_rest_object(cls, rest_obj: RestWorkspace) -> Optional["Workspace"]:
334334
if hasattr(rest_obj, "ml_flow_tracking_uri"):
335335
mlflow_tracking_uri = rest_obj.ml_flow_tracking_uri
336336

337+
# TODO: Remove once Online endpoints updates API version to at least 2023-08-01
338+
allow_roleassignment_on_rg = None
339+
if hasattr(rest_obj, "allow_roleassignment_on_rg"):
340+
allow_roleassignment_on_rg = rest_obj.allow_roleassignment_on_rg
341+
system_datastores_auth_mode = None
342+
if hasattr(rest_obj, "system_datastores_auth_mode"):
343+
system_datastores_auth_mode = rest_obj.system_datastores_auth_mode
344+
337345
# TODO: remove this once it is included in API response
338346
managed_network = None
339347
if hasattr(rest_obj, "managed_network"):
@@ -386,10 +394,10 @@ def _from_rest_object(cls, rest_obj: RestWorkspace) -> Optional["Workspace"]:
386394
identity=identity,
387395
primary_user_assigned_identity=rest_obj.primary_user_assigned_identity,
388396
managed_network=managed_network,
389-
system_datastores_auth_mode=rest_obj.system_datastores_auth_mode,
397+
system_datastores_auth_mode=system_datastores_auth_mode,
390398
feature_store_settings=feature_store_settings,
391399
enable_data_isolation=rest_obj.enable_data_isolation,
392-
allow_roleassignment_on_rg=rest_obj.allow_roleassignment_on_rg,
400+
allow_roleassignment_on_rg=allow_roleassignment_on_rg,
393401
hub_id=rest_obj.hub_resource_id,
394402
workspace_id=rest_obj.workspace_id,
395403
serverless_compute=serverless_compute,

0 commit comments

Comments
 (0)