Fix app updating issues when the payload contains same app name

revert-70ac1926
tcdlpds@gmail.com 4 years ago
parent 104bca0fb5
commit 571d8afa11

@ -1969,7 +1969,8 @@ public class ApplicationManagerImpl implements ApplicationManager {
ApplicationDTO applicationDTO = getApplication(applicationId); ApplicationDTO applicationDTO = getApplication(applicationId);
try { try {
ConnectionManagerUtil.beginDBTransaction(); ConnectionManagerUtil.beginDBTransaction();
if (!StringUtils.isEmpty(applicationUpdateWrapper.getName())){ if (!StringUtils.isEmpty(applicationUpdateWrapper.getName()) && !applicationDTO.getName()
.equals(applicationUpdateWrapper.getName())) {
if (applicationDAO if (applicationDAO
.isExistingAppName(applicationUpdateWrapper.getName().trim(), applicationDTO.getDeviceTypeId(), .isExistingAppName(applicationUpdateWrapper.getName().trim(), applicationDTO.getDeviceTypeId(),
tenantId)) { tenantId)) {

Loading…
Cancel
Save