Skip to content

Commit

Permalink
Merge pull request #312 from icefoganalytics/test
Browse files Browse the repository at this point in the history
Fixing for blank postal
  • Loading branch information
datajohnson authored Oct 31, 2024
2 parents 689766c + 23b9494 commit 4fe1d7c
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 4fe1d7c

Please sign in to comment.