|
|
|
@ -908,12 +908,13 @@ public abstract class BaseController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void checkCalculatedFieldId(CalculatedFieldId calculatedFieldId, Operation operation) throws ThingsboardException { |
|
|
|
private CalculatedField checkCalculatedFieldId(CalculatedFieldId calculatedFieldId, Operation operation) throws ThingsboardException { |
|
|
|
validateId(calculatedFieldId, "Invalid entity id"); |
|
|
|
SecurityUser user = getCurrentUser(); |
|
|
|
CalculatedField cf = calculatedFieldService.findById(user.getTenantId(), calculatedFieldId); |
|
|
|
checkNotNull(cf, calculatedFieldId.getEntityType().getNormalName() + " with id [" + calculatedFieldId + "] is not found"); |
|
|
|
checkEntityId(cf.getEntityId(), operation); |
|
|
|
return cf; |
|
|
|
} |
|
|
|
|
|
|
|
protected HomeDashboardInfo getHomeDashboardInfo(SecurityUser securityUser, JsonNode additionalInfo) { |
|
|
|
|