Skip to content

Commit

Permalink
Merge pull request #567 from open-formulieren/of-3523/cosign-fails-wi…
Browse files Browse the repository at this point in the history
…thout-privacy-consent-enabled

[OF#3523] Fix cosign when no privacy concent enabled
  • Loading branch information
sergei-maertens authored Oct 19, 2023
2 parents 78de3ba + a10f298 commit 327cf92
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Summary/CosignSummary.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 327cf92

Please sign in to comment.