Merge pull request #7 from ShvaykaD/feature/delete_attributes_node
add validation for empty list of attributes in save attributes node
This commit is contained in:
commit
4bbcfb1917
@ -66,6 +66,10 @@ public class TbMsgAttributesNode implements TbNode {
|
||||
}
|
||||
String src = msg.getData();
|
||||
List<AttributeKvEntry> attributes = new ArrayList<>(JsonConverter.convertToAttributes(new JsonParser().parse(src)));
|
||||
if (attributes.isEmpty()) {
|
||||
ctx.tellSuccess(msg);
|
||||
return;
|
||||
}
|
||||
String notifyDeviceStr = msg.getMetaData().getValue("notifyDevice");
|
||||
ctx.getTelemetryService().saveAndNotify(
|
||||
ctx.getTenantId(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user