Browse Source

fixed customer creation for NULL customer id

pull/13468/head
dashevchenko 1 year ago
parent
commit
071baaaad3
  1. 2
      common/edqs/src/main/java/org/thingsboard/server/edqs/repo/TenantRepo.java

2
common/edqs/src/main/java/org/thingsboard/server/edqs/repo/TenantRepo.java

@ -191,7 +191,7 @@ public class TenantRepo {
getEntitySet(entityType).add(entityData);
}
UUID newCustomerId = fields.getCustomerId();
UUID newCustomerId = CustomerId.NULL_UUID.equals(fields.getCustomerId()) ? null : fields.getCustomerId();
UUID oldCustomerId = entityData.getCustomerId();
entityData.setCustomerId(newCustomerId);
if (entityIdMismatch(oldCustomerId, newCustomerId)) {

Loading…
Cancel
Save