Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update getPollResult to avoid translate undefined #4473

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

reiterl
Copy link
Member

@reiterl reiterl commented Dec 10, 2024

Resolve #4463

Exclude the singleVotingResult with vote equals undefined to avoid the translation of undefined.

Copy link
Member

@Elblinator Elblinator left a comment

Choose a reason for hiding this comment

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

function

@Elblinator Elblinator removed their assignment Dec 10, 2024
@@ -171,6 +171,7 @@ export class TopicPdfService {
return true;
}
})
.filter((singleResult: VotingResult) => !!singleResult.vote)
Copy link
Member

@bastianjoel bastianjoel Dec 11, 2024

Choose a reason for hiding this comment

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

You could just do this check within the other filter call.

Also in line 179 there is logic to handle such cases. So either remove that logic or adjust it. I've committed a solution with the latter to you PR as it does not come with behavioral changes (Which your solution actually introduces).

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it is removed. I have looked at your comment and think, it could work that way.

@reiterl
Copy link
Member Author

reiterl commented Dec 11, 2024

@Elblinator , @bspekker please retest after @bastianjoel commit.

@reiterl reiterl removed their assignment Dec 11, 2024
@reiterl reiterl changed the title Filter in getPollResult to avoid undefined Update getPollResult to avoid translate undefined Dec 11, 2024
@reiterl
Copy link
Member Author

reiterl commented Dec 11, 2024

@bastianjoel 's code seems to be okay. My filter code is no longer needed and is removed.

@reiterl reiterl assigned Elblinator and bspekker and unassigned rrenkert Dec 11, 2024
@Elblinator Elblinator merged commit 277cf22 into OpenSlides:main Dec 11, 2024
5 checks passed
@reiterl reiterl deleted the 4463-work-on-election-pdf-export branch December 11, 2024 12:51
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.

Export of elections and topic polls does not work
5 participants