From 071baaaad312f3b748e8fbdb37d4f3203a8e0289 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Thu, 29 May 2025 11:55:53 +0300 Subject: [PATCH] fixed customer creation for NULL customer id --- .../main/java/org/thingsboard/server/edqs/repo/TenantRepo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/edqs/src/main/java/org/thingsboard/server/edqs/repo/TenantRepo.java b/common/edqs/src/main/java/org/thingsboard/server/edqs/repo/TenantRepo.java index ffba7583c9..10bab528b9 100644 --- a/common/edqs/src/main/java/org/thingsboard/server/edqs/repo/TenantRepo.java +++ b/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)) {