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

POSTing to /election/:id/audit/reset breaks things #97

Closed
MorganLove opened this issue Aug 26, 2019 · 1 comment
Closed

POSTing to /election/:id/audit/reset breaks things #97

MorganLove opened this issue Aug 26, 2019 · 1 comment
Assignees

Comments

@MorganLove
Copy link
Contributor

Currently on master after POSTing to /election/:id/audit/reset further calls to endpoints using that id result in 500 errors.

ERROR in app: Exception on /election/9710b544-8fb1-474f-ac50-97d8b8505be5/audit/status [GET]
Traceback (most recent call last):
  File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/flask/app.py", line 2311, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/flask/app.py", line 1834, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/flask/app.py", line 1737, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/flask/_compat.py", line 36, in reraise
    raise value
  File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/flask/app.py", line 1832, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/flask/app.py", line 1818, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/morgan/Desktop/votingworks/arlo/app.py", line 207, in audit_status
    election = get_election(election_id)
  File "/Users/morgan/Desktop/votingworks/arlo/app.py", line 44, in get_election
    return Election.query.filter_by(id = (election_id or '1')).one()
  File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3289, in one
    raise orm_exc.NoResultFound("No row was found for one()")
sqlalchemy.orm.exc.NoResultFound: No row was found for one()
@benadida
Copy link
Collaborator

benadida commented Sep 5, 2019

fixed.

@benadida benadida closed this as completed Sep 5, 2019
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

No branches or pull requests

2 participants