Commit b9338fbb authored by Deep Dey's avatar Deep Dey

fix: fix form-submission-error for single parent

parent aa49fc98
......@@ -20,3 +20,16 @@ alter table admission_form_data
add mother_denomination varchar(255);
alter table admission_form_data
add mother_church varchar(255);
alter table admission_form_data
alter column mother_name drop not null;
alter table admission_form_data
alter column mother_nationality drop not null;
alter table admission_form_data
alter column mother_religion drop not null;
alter table admission_form_data
alter column mother_mother_tongue drop not null;
alter table admission_form_data
alter column mother_community drop not null;
alter table admission_form_data
alter column mother_school_info drop not null;
\ No newline at end of file
......@@ -51,7 +51,7 @@ public class AdmissionFormController {
@Valid @ModelAttribute AdmissionFormData admissionFormData,
@RequestPart("candidateImage") MultipartFile candidateImage,
@RequestPart("fatherImage") MultipartFile fatherImage,
@RequestPart("motherImage") MultipartFile motherImage
@RequestPart(value = "motherImage", required = false) MultipartFile motherImage
) throws Exception {
if (!admissionFormDAOController
......
......@@ -52,7 +52,7 @@ public class AdmissionFormDAOController {
)
);
if (formData.getMotherImage() != null) {
if (formData.getMotherImage() != null && !formData.getMotherImage().isEmpty()) {
formData.setMotherImageName(
fileStorageService.storeFile(
formData.getMotherImage(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment