fixed customer creation for NULL customer id

This commit is contained in:
dashevchenko 2025-05-29 11:55:53 +03:00
parent c8151ccb84
commit 071baaaad3

View File

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