From 1d9c7550fc5a29e772fffe09cd3780aec8e6cbf7 Mon Sep 17 00:00:00 2001 From: James Chang Date: Tue, 26 Oct 2021 16:23:03 -0400 Subject: [PATCH] Fix issue with permissions checking on legacyRecord model --- backend/functions/src/schema/models/legacyRecord/service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/functions/src/schema/models/legacyRecord/service.ts b/backend/functions/src/schema/models/legacyRecord/service.ts index b2958d0..382cc27 100644 --- a/backend/functions/src/schema/models/legacyRecord/service.ts +++ b/backend/functions/src/schema/models/legacyRecord/service.ts @@ -27,7 +27,7 @@ export class LegacyRecordService extends PaginatedService { - Email is not a requested field */ get: async ({ query }) => { - if (query.email) return false; + if (query?.email) return false; return true; }, @@ -37,7 +37,7 @@ export class LegacyRecordService extends PaginatedService { - Email is not a requested field */ getMultiple: ({ query }) => { - if (query.email) return false; + if (query?.email) return false; return true; },