diff --git a/src/api/services/admin/nars-v17-2-reporting-service.ts b/src/api/services/admin/nars-v17-2-reporting-service.ts index 56d4ae10..45af5ae1 100644 --- a/src/api/services/admin/nars-v17-2-reporting-service.ts +++ b/src/api/services/admin/nars-v17-2-reporting-service.ts @@ -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, @@ -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"; } }