Fixed warn message in case device with name already exists
This commit is contained in:
parent
8bea1016a3
commit
e7e8ce1e26
@ -62,7 +62,7 @@ public abstract class BaseDeviceProcessor extends BaseEdgeProcessor {
|
|||||||
Device deviceByName = deviceService.findDeviceByTenantIdAndName(tenantId, deviceName);
|
Device deviceByName = deviceService.findDeviceByTenantIdAndName(tenantId, deviceName);
|
||||||
if (deviceByName != null) {
|
if (deviceByName != null) {
|
||||||
deviceName = deviceName + "_" + RandomStringUtils.randomAlphabetic(15);
|
deviceName = deviceName + "_" + RandomStringUtils.randomAlphabetic(15);
|
||||||
log.warn("Device with name {} already exists on the cloud. Renaming device name to {}",
|
log.warn("Device with name {} already exists. Renaming device name to {}",
|
||||||
deviceUpdateMsg.getName(), deviceName);
|
deviceUpdateMsg.getName(), deviceName);
|
||||||
deviceNameUpdated = true;
|
deviceNameUpdated = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user