Skip to content

Commit

Permalink
Fixing for blank postal
Browse files Browse the repository at this point in the history
  • Loading branch information
datajohnson committed Oct 31, 2024
1 parent bd85364 commit 23b9494
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/api/services/admin/nars-v17-2-reporting-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ export class NarsV17_2ReportingService {

if (app.primary_country_id && app.primary_country_id != 1) res_postal = "XXXXXX";
} else {



let homeAddress = await db("sfa.v_current_person_address")
.where({
person_id: app.person_id,
Expand All @@ -125,7 +122,7 @@ export class NarsV17_2ReportingService {
.first();

if (homeAddress) {
res_postal = homeAddress.postal_code.replace(" ", "").replace("-", "");
res_postal = (homeAddress.postal_code ?? "").replace(" ", "").replace("-", "");
if (homeAddress.country != "Canada") res_postal = "XXXXXX";
}
}
Expand Down

0 comments on commit 23b9494

Please sign in to comment.