Skip to content

fix: fix bug with pdf downloads for tokens with draft propsals - #1721

Open
TCMeldrum wants to merge 1 commit into
developfrom
pdf-token-fix-for-draft-proposals
Open

fix: fix bug with pdf downloads for tokens with draft propsals#1721
TCMeldrum wants to merge 1 commit into
developfrom
pdf-token-fix-for-draft-proposals

Conversation

@TCMeldrum

@TCMeldrum TCMeldrum commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes a bug that was preventing the download of PDFs for tokens with draft properties.

Motivation and Context

The change is required to allow users to download PDFs proposals that have a insturment picker question but have not answered that question, which was previously not possible due to a bug.

Changes

  1. Added a conditional check to ensure that the answerId is not null before attempting to fetch the call by answerId proposal.

How Has This Been Tested?

Fixes Jira Issue

https://jira.ess.eu//browse/

Depends On

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@TCMeldrum
TCMeldrum marked this pull request as ready for review August 13, 2026 15:10
@TCMeldrum
TCMeldrum requested a review from a team as a code owner August 13, 2026 15:10
@TCMeldrum
TCMeldrum requested review from ACLay and removed request for a team August 13, 2026 15:10
@TCMeldrum TCMeldrum changed the title fix: fix bug with pdf downloads for tokens with draft props fix: fix bug with pdf downloads for tokens with draft propsals Aug 13, 2026
...answer,
value,
});
if (answer.answerId !== null) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also handle the type as well?

As per the type definition, answerId is non nullable. In the case, I would recommend to refine the type definition as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants