Added change to the null condition check for the policy threshold

This commit is contained in:
Cyrus 2022-02-14 14:46:15 -05:00
parent d353854835
commit 81068850bd

View File

@ -473,13 +473,14 @@ public class PolicyPageController extends PageController<NoPageParams> {
if (generateCertificateEnabled) {
threshold = ppModel.getThresholdValue();
if (threshold == null) {
threshold = SupplyChainPolicy.YEAR;
}
} else {
threshold = ppModel.getReissueThreshold();
}
if (threshold == null || threshold.isEmpty()) {
threshold = SupplyChainPolicy.YEAR;
}
policy.setReissueThreshold(threshold);
} else {
generateCertificateEnabled = false;
@ -542,13 +543,14 @@ public class PolicyPageController extends PageController<NoPageParams> {
if (generateDevIdCertificateEnabled) {
threshold = ppModel.getDevIdThresholdValue();
if (threshold == null) {
threshold = SupplyChainPolicy.YEAR;
}
} else {
threshold = ppModel.getDevIdReissueThreshold();
}
if (threshold == null || threshold.isEmpty()) {
threshold = SupplyChainPolicy.YEAR;
}
policy.setDevIdReissueThreshold(threshold);
} else {
generateDevIdCertificateEnabled = false;