diff --git a/java/registry/src/main/java/dev/sunbirdrc/registry/service/impl/RegistryServiceImpl.java b/java/registry/src/main/java/dev/sunbirdrc/registry/service/impl/RegistryServiceImpl.java index 989037820..682fb2775 100755 --- a/java/registry/src/main/java/dev/sunbirdrc/registry/service/impl/RegistryServiceImpl.java +++ b/java/registry/src/main/java/dev/sunbirdrc/registry/service/impl/RegistryServiceImpl.java @@ -483,7 +483,11 @@ private void doDelete(IRegistryDao registryDao, VertexReader vr, Set pre itemUuid = ArrayHelper.unquoteString(itemUuid); if (!updatedUuids.contains(itemUuid)) { // delete this item - registryDao.deleteEntity(uuidVertexMap.get(itemUuid)); + if(isHardDeleteEnabled) { + registryDao.hardDeleteEntity(uuidVertexMap.get(itemUuid)); + } else { + registryDao.deleteEntity(uuidVertexMap.get(itemUuid)); + } } } }