From 6c52d472582abfbab44354722444596f08fa3a66 Mon Sep 17 00:00:00 2001 From: Wenhao Zhang Date: Tue, 18 Jan 2022 11:36:00 +0800 Subject: [PATCH] Fix certificate list output error (#4330) * Fix certificate output error * Update according to comments Co-authored-by: Wenhao Zhang --- src/spring-cloud/azext_spring_cloud/_transformers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/spring-cloud/azext_spring_cloud/_transformers.py b/src/spring-cloud/azext_spring_cloud/_transformers.py index 1f64170bcd5..d33fb5e37bc 100644 --- a/src/spring-cloud/azext_spring_cloud/_transformers.py +++ b/src/spring-cloud/azext_spring_cloud/_transformers.py @@ -83,13 +83,13 @@ def transform_spring_cloud_certificate_output(result): result = [result] for item in result: - item['Certificate Name'] = item['properties']['keyVaultCertName'] + item['Certificate Name'] = item['name'] item['Thumbprint'] = item['properties']['thumbprint'] item['Activate Date'] = item['properties']['activateDate'].split("T")[0] - item['Certificate Version'] = item['properties']['certVersion'] item['DNS Names'] = item['properties']['dnsNames'] item['Expiration Date'] = item['properties']['expirationDate'].split("T")[0] - item['Key Vault Uri'] = item['properties']['vaultUri'] + item['Certificate Version'] = item['properties'].get('certVersion', "") + item['Key Vault Uri'] = item['properties'].get('vaultUri', "") return result if is_list else result[0]