Compound with front-end, fix of incorrect getter use

This commit is contained in:
Andrew Volostnykh 2021-02-12 11:59:01 +02:00 committed by Andrew Shvayka
parent 77de9da2a8
commit e93c975a01
2 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ public class DynamicValue<T> {
public DynamicValue(DynamicValueSourceType sourceType, String sourceAttribute) { public DynamicValue(DynamicValueSourceType sourceType, String sourceAttribute) {
this.sourceAttribute = sourceAttribute; this.sourceAttribute = sourceAttribute;
this.sourceType = sourceType; this.sourceType = sourceType;
this.inheritMode = false; this.inherit = false;
} }
@Getter @Getter
@ -38,6 +38,6 @@ public class DynamicValue<T> {
@Getter @Getter
private final String sourceAttribute; private final String sourceAttribute;
@Getter @Getter
private final boolean inheritMode; private final boolean inherit;
} }

View File

@ -393,7 +393,7 @@ class AlarmRuleState {
break; break;
case CURRENT_CUSTOMER: case CURRENT_CUSTOMER:
ekv = dynamicPredicateValueCtx.getCustomerValue(value.getDynamicValue().getSourceAttribute()); ekv = dynamicPredicateValueCtx.getCustomerValue(value.getDynamicValue().getSourceAttribute());
if(ekv == null && value.getDynamicValue().getInheritMode()) { if(ekv == null && value.getDynamicValue().isInherit()) {
ekv = dynamicPredicateValueCtx.getTenantValue(value.getDynamicValue().getSourceAttribute()); ekv = dynamicPredicateValueCtx.getTenantValue(value.getDynamicValue().getSourceAttribute());
} }
break; break;
@ -408,7 +408,7 @@ class AlarmRuleState {
} }
} }
} }
if(ekv == null && value.getDynamicValue().getInheritMode()) { if(ekv == null && value.getDynamicValue().isInherit()) {
ekv = dynamicPredicateValueCtx.getCustomerValue(value.getDynamicValue().getSourceAttribute()); ekv = dynamicPredicateValueCtx.getCustomerValue(value.getDynamicValue().getSourceAttribute());
if(ekv == null) { if(ekv == null) {
ekv = dynamicPredicateValueCtx.getTenantValue(value.getDynamicValue().getSourceAttribute()); ekv = dynamicPredicateValueCtx.getTenantValue(value.getDynamicValue().getSourceAttribute());