Skip to content

Commit debc45c

Browse files
authored
Merge pull request Azure#10562 from SimonFrisendalBEC/master
Handle "nullable object must have a value" exception in VaultManagementClient.cs
2 parents 0bb724b + ec680e7 commit debc45c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/KeyVault/KeyVault/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Fixed error accessing value that is potentially not set
2122

2223
## Version 1.3.1
2324
* Fixed miscellaneous typos across module

src/KeyVault/KeyVault/Models/VaultManagementClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public PSKeyVault UpdateVault(
180180
&& updatedSoftDeleteSwitch.Value)
181181
properties.EnableSoftDelete = updatedSoftDeleteSwitch;
182182

183-
if (!(properties.EnablePurgeProtection.HasValue && properties.EnableSoftDelete.Value)
183+
if (!(properties.EnablePurgeProtection.HasValue && properties.EnablePurgeProtection.Value)
184184
&& updatedPurgeProtectionSwitch.HasValue
185185
&& updatedPurgeProtectionSwitch.Value)
186186
properties.EnablePurgeProtection = updatedPurgeProtectionSwitch;

0 commit comments

Comments
 (0)