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

Some code doesn't protect itself from the possibility that add_state_change_event can return Null #1566

Closed
ietf-svn-bot opened this issue Dec 18, 2014 · 4 comments

Comments

@ietf-svn-bot
Copy link

resolution_fixed type_defect | by rjsparks@nostrum.com


AttributeError at /doc/draft-ietf-pcp-server-selection/edit/lastcalltext/

'NoneType' object has no attribute 'desc'

Request Method: 	POST
Request URL: 	https://datatracker.ietf.org/doc/draft-ietf-pcp-server-selection/edit/lastcalltext/
Django Version: 	1.6
Exception Type: 	AttributeError
Exception Value: 	

'NoneType' object has no attribute 'desc'

Exception Location: 	/a/www/ietf-datatracker/web/ietf/doc/views_ballot.py in lastcalltext, line 457
Python Executable: 	/usr/bin/python

Most of the places that the function is currently called is safe - the call is inside an if condition that will ensure the function will return a DocEvent. But in ietf/doc/views_ballot.py there are a couple of places that have no such guarantee, leading to runtime errors as above.


Issue migrated from trac:1566 at 2022-03-04 03:58:10 +0000

@ietf-svn-bot
Copy link
Author

@rjsparks@nostrum.com changed status from new to closed

@ietf-svn-bot
Copy link
Author

@rjsparks@nostrum.com changed resolution from `` to fixed

@ietf-svn-bot
Copy link
Author

@rjsparks@nostrum.com commented


Fixed in 601575a:

Verify that add_state_change_event returned something before trying to use attributes of the return value. Fixes bug #1566. Commit ready for merge.

@ietf-svn-bot
Copy link
Author

@henrik@levkowetz.com commented


Fixed in ff9ae1a:

Merged in 601575a from rjsparks@nostrum.com:
Verify that add_state_change_event returned something before trying to use attributes of the return value. Fixes bug #1566.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant