From 2b64ca8605e31c9c3dc1812bbc054a72dd2d4df7 Mon Sep 17 00:00:00 2001 From: ShvaykaD Date: Thu, 2 May 2024 15:46:28 +0300 Subject: [PATCH] fix typo in the upgrade script --- .../update/DefaultDataUpdateService.java | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/application/src/main/java/org/thingsboard/server/service/install/update/DefaultDataUpdateService.java b/application/src/main/java/org/thingsboard/server/service/install/update/DefaultDataUpdateService.java index 3bd65edd1a..06cbdc2230 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/update/DefaultDataUpdateService.java +++ b/application/src/main/java/org/thingsboard/server/service/install/update/DefaultDataUpdateService.java @@ -35,7 +35,6 @@ import org.thingsboard.server.common.data.query.DynamicValue; import org.thingsboard.server.common.data.query.FilterPredicateValue; import org.thingsboard.server.dao.customer.CustomerDao; import org.thingsboard.server.dao.customer.CustomerService; -import org.thingsboard.server.dao.customer.CustomerServiceImpl; import org.thingsboard.server.dao.device.DeviceConnectivityConfiguration; import org.thingsboard.server.dao.rule.RuleChainService; import org.thingsboard.server.dao.settings.AdminSettingsService; @@ -126,20 +125,11 @@ public class DefaultDataUpdateService implements DataUpdateService { newTitle = currentTitle + "_" + currentCustomer.getId(); } currentCustomer.setTitle(newTitle); - if (currentTitle.equals(CustomerServiceImpl.PUBLIC_CUSTOMER_TITLE)) { - try { - customerDao.save(tenantIdToDeduplicate, currentCustomer); - } catch (Exception e) { - log.error("[{}] Failed to update public customer with id and title: {}, oldTitle: {}, due to: ", - currentCustomer.getTenantId(), newTitle, currentTitle, e); - } - } else { - try { - customerService.saveCustomer(currentCustomer); - } catch (Exception e) { - log.error("[{}] Failed to update customer with id and title: {}, oldTitle: {}, due to: ", - currentCustomer.getTenantId(), newTitle, currentTitle, e); - } + try { + customerService.saveCustomer(currentCustomer); + } catch (Exception e) { + log.error("[{}] Failed to update customer with id and title: {}, oldTitle: {}, due to: ", + currentCustomer.getTenantId(), newTitle, currentTitle, e); } continue; }