Browse Source

fix validation logic of zoneGroupConfiguration after testing

pull/13857/head
dshvaika 1 year ago
parent
commit
c678634344
  1. 6
      common/data/src/main/java/org/thingsboard/server/common/data/cf/configuration/geofencing/ZoneGroupConfiguration.java

6
common/data/src/main/java/org/thingsboard/server/common/data/cf/configuration/geofencing/ZoneGroupConfiguration.java

@ -53,6 +53,9 @@ public class ZoneGroupConfiguration {
if (reportStrategy == null) { if (reportStrategy == null) {
throw new IllegalArgumentException("Report strategy must be specified for '" + name + "' zone group!"); throw new IllegalArgumentException("Report strategy must be specified for '" + name + "' zone group!");
} }
if (hasDynamicSource()) {
refDynamicSourceConfiguration.validate();
}
if (!createRelationsWithMatchedZones) { if (!createRelationsWithMatchedZones) {
return; return;
} }
@ -62,9 +65,6 @@ public class ZoneGroupConfiguration {
if (direction == null) { if (direction == null) {
throw new IllegalArgumentException("Relation direction must be specified for '" + name + "' zone group!"); throw new IllegalArgumentException("Relation direction must be specified for '" + name + "' zone group!");
} }
if (hasDynamicSource()) {
refDynamicSourceConfiguration.validate();
}
} }
public boolean hasDynamicSource() { public boolean hasDynamicSource() {

Loading…
Cancel
Save