diff --git a/authentication/authentication-common/src/main/java/io/mosip/authentication/common/service/websub/impl/OndemandTemplateEventPublisher.java b/authentication/authentication-common/src/main/java/io/mosip/authentication/common/service/websub/impl/OndemandTemplateEventPublisher.java index 3e03431a637..4bc0178c3bc 100644 --- a/authentication/authentication-common/src/main/java/io/mosip/authentication/common/service/websub/impl/OndemandTemplateEventPublisher.java +++ b/authentication/authentication-common/src/main/java/io/mosip/authentication/common/service/websub/impl/OndemandTemplateEventPublisher.java @@ -137,7 +137,7 @@ private void sendEvents(BaseRequestDTO baserequestdto, String headerSignature, O encryptIndividualId(baserequestdto.getIndividualId(), partnerDataCert.get().getCertificateData())); eventData.put(AUTH_PARTNER_ID, partner.map(PartnerDTO::getPartnerId).orElse(null)); eventData.put(INDIVIDUAL_ID_TYPE, baserequestdto.getIndividualIdType()); - eventData.put(ENTITY_NAME, partner.isPresent() ? partner.get().getPartnerName() : null); + eventData.put(ENTITY_NAME, partner.map(PartnerDTO::getPartnerName).orElse(null)); eventData.put(REQUEST_SIGNATURE, headerSignature); EventModel eventModel = createEventModel(onDemadTemplateExtractionTopic, eventData); publishEvent(eventModel);