From d50c85a6a487c77bcdb89bc74997d6145bf866df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mir=C3=B3=20Sorja?= Date: Tue, 15 Oct 2024 12:01:54 +0200 Subject: [PATCH 1/2] null check role (#4029) --- src/meta/user/authorizer/canViewReview.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meta/user/authorizer/canViewReview.ts b/src/meta/user/authorizer/canViewReview.ts index 9a9d8ae07e..6255bf69de 100644 --- a/src/meta/user/authorizer/canViewReview.ts +++ b/src/meta/user/authorizer/canViewReview.ts @@ -44,7 +44,7 @@ const hasEditSectionPermission = ( const userRole = Users.getRole(user, countryIso, cycle) - return countryStatus[userRole.role]?.includes(status) && hasCollaboratorEditSectionPermission(props) + return countryStatus[userRole?.role]?.includes(status) && hasCollaboratorEditSectionPermission(props) } /** From e641fc8147af76caae5639dea6f05c378173226d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mir=C3=B3=20Sorja?= Date: Tue, 15 Oct 2024 12:15:51 +0200 Subject: [PATCH 2/2] Bulk download: NWFP: add quantity, unit (#4030) --- src/server/controller/cycleData/getBulkDownload/getNWFP.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/controller/cycleData/getBulkDownload/getNWFP.ts b/src/server/controller/cycleData/getBulkDownload/getNWFP.ts index 146cc0b255..6d07f7e3a2 100644 --- a/src/server/controller/cycleData/getBulkDownload/getNWFP.ts +++ b/src/server/controller/cycleData/getBulkDownload/getNWFP.ts @@ -48,7 +48,7 @@ export const getNWFP = async (props: Props) => { } const variableSet1 = Array.from({ length: 10 }, (_, i) => `product_${i + 1}`) - const colSet1 = ['product_name', 'value', 'category'] + const colSet1 = ['product_name', 'value', 'category', 'quantity', 'unit'] variableSet1.forEach((variableName) => { colSet1.forEach((colName) => {