Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
Just a little bit of error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Gottfried authored and Tom Gottfried committed Sep 7, 2017
1 parent 542295f commit 1bea2e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ringo/views/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ def setstandin(request, allowed_users=None):
user_id = urlparse.urlparse(
request.GET.get('backurl')).path.split('/')[-1]
user = request.db.query(User).get(user_id)
if not user:
raise HTTPBadRequest()
# Otherwise the user sets the standin of his own group. In this
# case the user is already in the request.
else:
Expand Down

0 comments on commit 1bea2e7

Please sign in to comment.