TbEntityDataSubCtx. getCurrentAggregation() - if curTsCmd or curTsCmd.getAgg is null - return NONE

This commit is contained in:
Volodymyr Babak 2022-12-12 16:02:38 +02:00
parent 3659c6d5b3
commit 8df0078989

View File

@ -89,7 +89,7 @@ public class TbEntityDataSubCtx extends TbAbstractDataSubCtx<EntityDataQuery> {
@Override
protected Aggregation getCurrentAggregation() {
return this.curTsCmd.getAgg() != null ? this.curTsCmd.getAgg() : Aggregation.NONE;
return (this.curTsCmd == null || this.curTsCmd.getAgg() == null) ? Aggregation.NONE : this.curTsCmd.getAgg();
}
private void sendLatestWsMsg(EntityId entityId, String sessionId, TelemetrySubscriptionUpdate subscriptionUpdate, EntityKeyType keyType) {