Skip to content

Commit

Permalink
Fix certificate list output error (Azure#4330)
Browse files Browse the repository at this point in the history
* Fix certificate output error

* Update according to comments

Co-authored-by: Wenhao Zhang <[email protected]>
  • Loading branch information
Descatles and Wenhao Zhang authored Jan 18, 2022
1 parent 4f79b66 commit 6c52d47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/spring-cloud/azext_spring_cloud/_transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 6c52d47

Please sign in to comment.