diff --git a/src/main/java/net/gepafin/tendermanagement/dao/ApplicationAmendmentRequestDao.java b/src/main/java/net/gepafin/tendermanagement/dao/ApplicationAmendmentRequestDao.java index 5ef0044c..3ac34c8e 100644 --- a/src/main/java/net/gepafin/tendermanagement/dao/ApplicationAmendmentRequestDao.java +++ b/src/main/java/net/gepafin/tendermanagement/dao/ApplicationAmendmentRequestDao.java @@ -355,12 +355,14 @@ public class ApplicationAmendmentRequestDao { List forms = applicationFormRepository.findByApplicationId(applicationAmendmentRequestEntity.getApplicationId()); Map fieldIdToLabelMap = extractFieldIdToLabelMap(forms); - + List amendmentFieldRequests= new ArrayList<>(); List amendmentFormFields = Utils.convertJsonStringToList( applicationAmendmentRequestEntity.getFormFields(), AmendmentFormField.class); Map formFieldEntityMap = getApplicationFormFieldEntityMap(applicationAmendmentRequestEntity, amendmentFormFields); - List amendmentFieldRequests = Utils.convertJsonStringToList(applicationAmendmentRequestEntity.getAmendmentDocument(),AmendmentFieldRequest.class); - if (amendmentFieldRequests != null) { + if(applicationAmendmentRequestEntity.getAmendmentDocument() !=null ){ + amendmentFieldRequests = Utils.convertJsonStringToList(applicationAmendmentRequestEntity.getAmendmentDocument(),AmendmentFieldRequest.class); + } + if (amendmentFieldRequests != null) { List amendmentDocumentResponses = amendmentFieldRequests.stream() .map(this::createAmendmentDocumentResponse) .toList();