From 10d70ddd82aa18dc0a5f5459aabbcf14a7644b5d Mon Sep 17 00:00:00 2001 From: ashvini Date: Tue, 16 Apr 2024 10:30:31 +0530 Subject: [PATCH] Resolve inability to edit app related data --- .../application/mgt/core/impl/ApplicationManagerImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/ApplicationManagerImpl.java b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/ApplicationManagerImpl.java index 56567155ed..efb55e60cb 100644 --- a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/ApplicationManagerImpl.java +++ b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/ApplicationManagerImpl.java @@ -2619,8 +2619,11 @@ public class ApplicationManagerImpl implements ApplicationManager { int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); String userName = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername(); ApplicationDTO applicationDTO = getApplication(applicationId); - String sanitizedName = ApplicationManagementUtil.sanitizeName(applicationUpdateWrapper.getName(), - Constants.ApplicationProperties.NAME ); + String sanitizedName = ""; + if (!StringUtils.isEmpty(applicationUpdateWrapper.getName())) { + sanitizedName = ApplicationManagementUtil.sanitizeName(applicationUpdateWrapper.getName(), + Constants.ApplicationProperties.NAME ); + } try { ConnectionManagerUtil.beginDBTransaction(); if (!StringUtils.isEmpty(sanitizedName) && !applicationDTO.getName()