Browse Source

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

pull/7773/head
Volodymyr Babak 4 years ago
parent
commit
8df0078989
  1. 2
      application/src/main/java/org/thingsboard/server/service/subscription/TbEntityDataSubCtx.java

2
application/src/main/java/org/thingsboard/server/service/subscription/TbEntityDataSubCtx.java

@ -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) {

Loading…
Cancel
Save