1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

fixed faulty conditional logic for showing enabled policy labels (#952)

This commit is contained in:
Addison Beck 2020-09-24 11:47:57 -04:00 committed by GitHub
parent aa6bc164bb
commit 34034829b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ namespace Bit.Portal.Models
foreach (var type in Enum.GetValues(typeof(PolicyType)).Cast<PolicyType>())
{
var enabled = policyDict?.ContainsKey(type) ?? false && policyDict[type].Enabled;
var enabled = policyDict.ContainsKey(type) ? policyDict[type].Enabled : false;
Policies.Add(new PolicyModel(type, enabled));
}
}