From 01a2cb30726d7bfda762438cd239e2053aab2983 Mon Sep 17 00:00:00 2001 From: Le Date: Mon, 2 Dec 2024 14:51:47 -0800 Subject: [PATCH] ccfri-3808 - AFS Print PDF change --- backend/src/components/application.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/components/application.js b/backend/src/components/application.js index ed4c2a78..5c925057 100644 --- a/backend/src/components/application.js +++ b/backend/src/components/application.js @@ -376,11 +376,11 @@ async function submitApplication(req, res) { const ccfriFacilitiesToLock = JSON.parse(JSON.stringify(declaration)); declaration = declaration.toJSON(); try { - printPdf(req).then(); - delete declaration.facilities; let response = await patchOperationWithObjectId('ccof_applications', req.params.applicationId, declaration); + await printPdf(req).then(); + // If CCRFI facilities exist on the payload we need to iterate // each and call CCFRI endpoint to relock attributes. if (checkKey('facilities', ccfriFacilitiesToLock)) {