From a10f298421ae8f3046532fc3faf2c2f46d445e27 Mon Sep 17 00:00:00 2001 From: vasileios Date: Wed, 18 Oct 2023 10:50:09 +0200 Subject: [PATCH] [open-formulieren/open-forms#3523] Added check for privacy policy acceptance when it's not enabled --- src/components/Summary/CosignSummary.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Summary/CosignSummary.js b/src/components/Summary/CosignSummary.js index efdc6e2f5..87deb0ffe 100644 --- a/src/components/Summary/CosignSummary.js +++ b/src/components/Summary/CosignSummary.js @@ -59,8 +59,11 @@ const CosignSummary = ({ event.preventDefault(); const cosignEndpoint = new URL(`/api/v2/submissions/${submission.id}/cosign`, submission.url); + + // privacy consent is not always enabled via the admin so we have to check if it is otherwise + // a value for privacyPolicyAccepted variable should be provided const response = await post(cosignEndpoint.href, { - privacyPolicyAccepted: privacyInfo.policyAccepted, + privacyPolicyAccepted: privacyInfo.policyAccepted || false, }); removeSubmissionId();