-
Notifications
You must be signed in to change notification settings - Fork 21
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 generating Powerpoint report header #431
Conversation
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #431 +/- ##
========================================
Coverage 80.40% 80.40%
========================================
Files 139 144 +5
Lines 9225 9389 +164
========================================
+ Hits 7417 7549 +132
- Misses 1808 1840 +32 ☔ View full report in Codecov by Sentry. |
) | ||
|
||
if form_states.count() == 1 and \ | ||
form_states[0] == FormState.ARCHIVED: | ||
stations_processed += 1 | ||
registrants_in_processed_stations += \ | ||
station.get('num_registrants') | ||
station_obj.registrants |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could raise AttributeError
if station_obj
is None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, so I have made sure we reuse the tally stations queryset used when creating stations_by_id that's used when defining station_obj. This will ensure we never encounter such an error
) | ||
voters = 0 | ||
stations_processed = 0 | ||
registrants_in_processed_stations = 0 | ||
for station in station_ids_by_race: | ||
station_obj = stations_by_id.get(station.get('id')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same Could raise AttributeError
if station.get('id')
returns None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above response also applies here
Fixes #430
Task checklist