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

Prevent division by zero #922

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

Berehum
Copy link
Contributor

@Berehum Berehum commented Feb 3, 2025

Please describe what your PR is fixing
In the statistics there are a few divisions where it would be possible to divide by zero. I've implemented a ternary operator to prevent divisions by zero.

Concretely, which issues does your PR solve? (Please reference them by typing Fixes/References Inter-Actief/amelie#<issue_id>)
Fixes/References #892

Does your PR change how we process personal data, impact our privacy document, or modify (one of) our data export(s)?
no

Does your PR include any django migrations?
no

Does your PR include the proper translations (did you add translations for new/modified strings)?
no, my PR does not include translations

Does your PR include CSS changes (and did you run the compile_css.sh script in the scripts directory to regenerate the compiled.css file)?
no, my PR does not include CSS changes

Does your PR need external actions by for example the System Administrators? (Think about new pip packages, new (local) settings, a new regular task or cronjob, new management commands, etc.)?
no

Did you properly test your PR before submitting it?
yes

@Berehum Berehum linked an issue Feb 3, 2025 that may be closed by this pull request
@supertom01 supertom01 merged commit caf7dd6 into main Feb 3, 2025
6 checks passed
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.

Division by Zero error in member statistics
2 participants