Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - null household #521

Merged
merged 2 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;

import static java.util.Collections.emptyList;
import static org.ladocuploader.app.utils.SubmissionUtilities.ENCRYPTED_SSNS_INPUT_NAME;
import static org.ladocuploader.app.utils.SubmissionUtilities.getDecryptedSSNKeyName;

Expand Down Expand Up @@ -35,8 +37,7 @@ public void run(Submission submission) {
submission.getInputData().put("ssn", decryptedSSN);
}

ArrayList<LinkedHashMap> householdMembers = (ArrayList) submission.getInputData().get("household");

List<LinkedHashMap> householdMembers = (ArrayList) submission.getInputData().getOrDefault("household", emptyList());
for (LinkedHashMap hhmember : householdMembers) {
String ssnKey = getDecryptedSSNKeyName((String) hhmember.get("uuid"));
encryptedSSN = (String) hhmember.remove(ENCRYPTED_SSNS_INPUT_NAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ <h2 th:text="#{ethnicity-selection.header(${inputData.firstName})}"></h2>
<th:block th:with="householdInputName=${'householdMemberEthnicity' + T(formflow.library.inputs.FieldNameMarkers).DYNAMIC_FIELD_MARKER + householdMember.uuid}">
<h2 th:text="#{ethnicity-selection.question(${householdMember.householdMemberFirstName})}"></h2>
<p class="text--help" th:text="#{ethnicity-selection.subheader}"></p>
<th:block th:replace="'fragments/inputs/radioFieldset' ::
<th:block th:replace="~{fragments/inputs/radioFieldset ::
radioFieldset(inputName=${householdInputName},
ariaLabel=#{ethnicity-selection.question(${householdMember.householdMemberFirstName})},
content=~{::householdEthnicitySelectionFieldSet})">
content=~{::householdEthnicitySelectionFieldSet})}">
<th:block th:ref="householdEthnicitySelectionFieldSet">
<th:block th:each="ethnicityType : ${T(org.ladocuploader.app.data.enums.EthnicityType).values()}">
<th:block
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
th:replace="~{'fragments/form' :: form(action=${formAction}, content=~{::raceEthnicityAsk})}">
<th:block th:ref="raceEthnicityAsk">
<div class="form-card__footer">
<th:block th:replace="fragments/inputs/yesOrNo :: yesOrNo(
<th:block th:replace="~{fragments/inputs/yesOrNo :: yesOrNo(
inputName='permissionToAskAboutRace',
ariaDescribe=#{race-ethnicity-ask.header},
overrideYesText=#{'race-ethnicity-ask.yes'},
overrideNoText=#{'race-ethnicity-ask.no'}
)"/>
)}"/>
</div>
</th:block>
</th:block>
Expand Down
Loading