diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 48e5746cdda..5d59934c95b 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -1790,10 +1790,9 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches, raise ArgumentUsageError('--disable-public-fqdn cannot be applied for none mode private dns zone cluster') instance.api_server_access_profile.enable_private_cluster_public_fqdn = False - if instance.auto_upgrade_profile is None: - instance.auto_upgrade_profile = ManagedClusterAutoUpgradeProfile() - if auto_upgrade_channel is not None: + if instance.auto_upgrade_profile is None: + instance.auto_upgrade_profile = ManagedClusterAutoUpgradeProfile() instance.auto_upgrade_profile.upgrade_channel = auto_upgrade_channel if not enable_managed_identity and assign_identity: