fix typo in the upgrade script
This commit is contained in:
parent
f1bf12e067
commit
2b64ca8605
@ -35,7 +35,6 @@ import org.thingsboard.server.common.data.query.DynamicValue;
|
|||||||
import org.thingsboard.server.common.data.query.FilterPredicateValue;
|
import org.thingsboard.server.common.data.query.FilterPredicateValue;
|
||||||
import org.thingsboard.server.dao.customer.CustomerDao;
|
import org.thingsboard.server.dao.customer.CustomerDao;
|
||||||
import org.thingsboard.server.dao.customer.CustomerService;
|
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.device.DeviceConnectivityConfiguration;
|
||||||
import org.thingsboard.server.dao.rule.RuleChainService;
|
import org.thingsboard.server.dao.rule.RuleChainService;
|
||||||
import org.thingsboard.server.dao.settings.AdminSettingsService;
|
import org.thingsboard.server.dao.settings.AdminSettingsService;
|
||||||
@ -126,21 +125,12 @@ public class DefaultDataUpdateService implements DataUpdateService {
|
|||||||
newTitle = currentTitle + "_" + currentCustomer.getId();
|
newTitle = currentTitle + "_" + currentCustomer.getId();
|
||||||
}
|
}
|
||||||
currentCustomer.setTitle(newTitle);
|
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 {
|
try {
|
||||||
customerService.saveCustomer(currentCustomer);
|
customerService.saveCustomer(currentCustomer);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("[{}] Failed to update customer with id and title: {}, oldTitle: {}, due to: ",
|
log.error("[{}] Failed to update customer with id and title: {}, oldTitle: {}, due to: ",
|
||||||
currentCustomer.getTenantId(), newTitle, currentTitle, e);
|
currentCustomer.getTenantId(), newTitle, currentTitle, e);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
titleToDeduplicate = currentCustomer.getTitle();
|
titleToDeduplicate = currentCustomer.getTitle();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user