Skip to content

Commit 669c082

Browse files
wenxuan0923Copilot
andcommitted
Update src/aks-preview/azext_aks_preview/custom.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 81c8ed3 commit 669c082

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/aks-preview/azext_aks_preview/custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,7 @@ def aks_scale(cmd, # pylint: disable=unused-argument
15791579
)
15801580

15811581
for agent_profile in (instance.agent_pool_profiles or []):
1582-
if agent_profile.name == nodepool_name or (nodepool_name == "" and len(instance.agent_pool_profiles) == 1):
1582+
if agent_profile.name == nodepool_name or (nodepool_name == "" and instance.agent_pool_profiles and len(instance.agent_pool_profiles) == 1):
15831583
if agent_profile.enable_auto_scaling:
15841584
raise CLIError(
15851585
"Cannot scale cluster autoscaler enabled node pool.")

0 commit comments

Comments
 (0)