From 3659c6d5b3eaed4ca42d8febd0861cd527d05a6a Mon Sep 17 00:00:00 2001 From: Volodymyr Babak Date: Mon, 12 Dec 2022 15:55:58 +0200 Subject: [PATCH] TbEntityDataSubCtx. getCurrentAggregation() - Added safe for null and return NONE in case null --- .../server/service/subscription/TbEntityDataSubCtx.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/main/java/org/thingsboard/server/service/subscription/TbEntityDataSubCtx.java b/application/src/main/java/org/thingsboard/server/service/subscription/TbEntityDataSubCtx.java index 2b727817fb..7efae57443 100644 --- a/application/src/main/java/org/thingsboard/server/service/subscription/TbEntityDataSubCtx.java +++ b/application/src/main/java/org/thingsboard/server/service/subscription/TbEntityDataSubCtx.java @@ -89,7 +89,7 @@ public class TbEntityDataSubCtx extends TbAbstractDataSubCtx { @Override protected Aggregation getCurrentAggregation() { - return this.curTsCmd.getAgg(); + return this.curTsCmd.getAgg() != null ? this.curTsCmd.getAgg() : Aggregation.NONE; } private void sendLatestWsMsg(EntityId entityId, String sessionId, TelemetrySubscriptionUpdate subscriptionUpdate, EntityKeyType keyType) {