Skip to content

Commit 5fe5b74

Browse files
authored
[Key Vault] Prepare patch release for keys (Azure#24059)
1 parent 028b103 commit 5fe5b74

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

sdk/keyvault/azure-keyvault-keys/CHANGELOG.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
# Release History
22

3-
## 4.5.1 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
3+
## 4.5.1 (2022-04-19)
84

95
### Bugs Fixed
10-
11-
### Other Changes
6+
- Fixed error that could occur when fetching a key rotation policy that has no defined
7+
`lifetime_actions`.
128

139
## 4.5.0 (2022-03-28)
1410

sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_models.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,11 @@ def __init__(self, **kwargs):
341341

342342
@classmethod
343343
def _from_generated(cls, policy):
344-
lifetime_actions = [KeyRotationLifetimeAction._from_generated(action) for action in policy.lifetime_actions] # pylint:disable=protected-access
344+
lifetime_actions = (
345+
None
346+
if policy.lifetime_actions is None
347+
else [KeyRotationLifetimeAction._from_generated(action) for action in policy.lifetime_actions] # pylint:disable=protected-access
348+
)
345349
if policy.attributes:
346350
return cls(
347351
policy_id=policy.id,

0 commit comments

Comments
 (0)