Skip to content

fix: guard against KeyError in telechat_page_count#8485

Merged
rjsparks merged 2 commits into
ietf-tools:mainfrom
jennifer-richards:page-count-for-pre-ad
Jan 30, 2025
Merged

fix: guard against KeyError in telechat_page_count#8485
rjsparks merged 2 commits into
ietf-tools:mainfrom
jennifer-richards:page-count-for-pre-ad

Conversation

@jennifer-richards

Copy link
Copy Markdown
Member

Fixes server errors when a pre-AD views the agenda_documents view.

The root cause of the issue is including pre-AD roles here:

ad = request.user.person if has_role(request.user, "Area Director") else None

The ad value set in that view is only used to compute the pages left to ballot, where it's assumed that the ad will be an active balloter. The bug being fixed comes from that assumption being violated.

@jennifer-richards jennifer-richards changed the title fix: guard against KeyError fix: guard against KeyError in telechat_page_count Jan 30, 2025
@rjsparks
rjsparks merged commit da85872 into ietf-tools:main Jan 30, 2025
@codecov

codecov Bot commented Jan 30, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.80%. Comparing base (896968d) to head (9fa6176).
Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8485   +/-   ##
=======================================
  Coverage   88.80%   88.80%           
=======================================
  Files         312      312           
  Lines       40886    40856   -30     
=======================================
- Hits        36307    36284   -23     
+ Misses       4579     4572    -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jennifer-richards
jennifer-richards deleted the page-count-for-pre-ad branch January 30, 2025 16:40
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants