diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/tenant/TenantMsgConstructorV1.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/tenant/TenantMsgConstructorV1.java index c6160c05bd..baa4a77b6b 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/tenant/TenantMsgConstructorV1.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/tenant/TenantMsgConstructorV1.java @@ -81,8 +81,7 @@ public class TenantMsgConstructorV1 implements TenantMsgConstructor { public TenantProfileUpdateMsg constructTenantProfileUpdateMsg(UpdateMsgType msgType, TenantProfile tenantProfile, EdgeVersion edgeVersion) { tenantProfile = JacksonUtil.clone(tenantProfile); // clear all config - DefaultTenantProfileConfiguration configuration = - (DefaultTenantProfileConfiguration) tenantProfile.getProfileData().getConfiguration(); + var configuration = tenantProfile.getDefaultProfileConfiguration(); configuration.setRpcTtlDays(0); configuration.setMaxJSExecutions(0); configuration.setMaxREExecutions(0); diff --git a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/tenant/TenantMsgConstructorV2.java b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/tenant/TenantMsgConstructorV2.java index 7ed36d9aef..274e18e7f3 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/tenant/TenantMsgConstructorV2.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/tenant/TenantMsgConstructorV2.java @@ -39,8 +39,7 @@ public class TenantMsgConstructorV2 implements TenantMsgConstructor { public TenantProfileUpdateMsg constructTenantProfileUpdateMsg(UpdateMsgType msgType, TenantProfile tenantProfile, EdgeVersion edgeVersion) { tenantProfile = JacksonUtil.clone(tenantProfile); // clear all config - DefaultTenantProfileConfiguration configuration = - (DefaultTenantProfileConfiguration) tenantProfile.getProfileData().getConfiguration(); + var configuration = tenantProfile.getDefaultProfileConfiguration(); configuration.setRpcTtlDays(0); configuration.setMaxJSExecutions(0); configuration.setMaxREExecutions(0);