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

Fix max_contribs calculation to handle None values #98

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

natlibfi-psams
Copy link
Contributor

Description

  • Modified list comprehension to safely handle missing or None 'contributors'
  • Use .get() with default empty list and 'or []' to ensure valid input for len()
  • Prevents TypeError when calculating max length of contributors lists

How Has This Been Tested?

Tested with falsy database

REF: [EKIR-382]

Copy link
Contributor

@NatLibFi-JoonaKupe NatLibFi-JoonaKupe left a comment

Choose a reason for hiding this comment

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

a-ok

@natlibfi-psams natlibfi-psams merged commit b960631 into main Sep 26, 2024
24 checks passed
@natlibfi-psams natlibfi-psams deleted the analytics_exporter_fix branch September 26, 2024 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants