Skip to content

Commit

Permalink
Prevent saving of null TestResultDelivery pref (#7018)
Browse files Browse the repository at this point in the history
  • Loading branch information
emyl3 authored Dec 6, 2023
1 parent e1c651c commit 2fbc7cc
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ public String addPatientToQueue(
symptomOnset,
noSymptoms);

personService.updateTestResultDeliveryPreference(patientId, testResultDelivery);
if (testResultDelivery != null) {
personService.updateTestResultDeliveryPreference(patientId, testResultDelivery);
}

return to.getInternalId()
.toString(); // this return is unused in the UI. it used to be PatientLinkInternalId
Expand All @@ -99,6 +101,8 @@ public void updateTimeOfTestQuestions(
testOrderService.updateTimeOfTestQuestions(
patientId, pregnancy, symptomsMap, symptomOnset, noSymptoms, genderOfSexualPartners);

personService.updateTestResultDeliveryPreference(patientId, testResultDelivery);
if (testResultDelivery != null) {
personService.updateTestResultDeliveryPreference(patientId, testResultDelivery);
}
}
}

0 comments on commit 2fbc7cc

Please sign in to comment.