Commit 3a861909 authored by Deep Dey's avatar Deep Dey

feat: add check for father email only if not twin child

parent db6b2710
...@@ -29,11 +29,13 @@ public class AdmissionFormDAOController { ...@@ -29,11 +29,13 @@ public class AdmissionFormDAOController {
public boolean addNewAdmissionData(@NotNull AdmissionFormData formData) throws Exception { public boolean addNewAdmissionData(@NotNull AdmissionFormData formData) throws Exception {
List<AdmissionFormData> data = admissionFormDataRepository if (formData.isCheckFatherEmail()) {
.getAdmissionFormDataByEmail(formData.getFatherEmail()); List<AdmissionFormData> data = admissionFormDataRepository
.getAdmissionFormDataByEmail(formData.getFatherEmail());
if (!data.isEmpty()) {
throw new Exception("Father's Email already Exists"); if (!data.isEmpty()) {
throw new Exception("Father's Email already Exists");
}
} }
formData.setCandidateImageName( formData.setCandidateImageName(
......
...@@ -102,4 +102,6 @@ public class AdmissionFormData { ...@@ -102,4 +102,6 @@ public class AdmissionFormData {
private String motherImageName; private String motherImageName;
private String interactionDate; private String interactionDate;
private String interactionTime; private String interactionTime;
private boolean checkFatherEmail;
} }
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