Skip to content

Commit

Permalink
fix null pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
fzhao99 committed Oct 23, 2023
1 parent cc36960 commit 5c5762a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,9 @@ public static ValueOrError getValue(
String name,
boolean isRequired,
boolean coercePossibleValueToLowerCase) {
if (coercePossibleValueToLowerCase) {
String value = row.get(name).toLowerCase();
row.put(name, value);
String val = row.get(name);
if (val != null && coercePossibleValueToLowerCase) {
row.put(name, val.toLowerCase());
}
return getValue(row, name, isRequired);
}
Expand Down
2 changes: 1 addition & 1 deletion backend/src/test/resources/patientBulkUpload/valid.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
last_name,first_name,middle_name,suffix,race,date_of_birth,biological_sex,ethnicity,street,street_2,city,county,state,zip_code,phone_number,phone_number_type,employed_in_healthcare,resident_congregate_setting,role,email,gender_identity,address_notes
Doe,Jane,Amanda,,black or african american,11/3/80,Female,not hispanic or latino,1234 Main Street,Apt 2,Anchorage,,AK,99501,410-867-5309,mobile,No,No,Staff,[email protected],female,some address note
Doe,Jane,Amanda,,black or african american,11/3/80,Female,not hispanic or latino,1234 Main Street,Apt 2,Anchorage,,AK,99501,410-867-5309,mobile,No,No,Staff,[email protected],FEMALE,some address note

0 comments on commit 5c5762a

Please sign in to comment.