Skip to content
Snippets Groups Projects
Commit 511a52af authored by Will Hunt's avatar Will Hunt
Browse files

Use body.get to check for 'user'

parent e885e2a6
No related branches found
No related tags found
No related merge requests found
......@@ -132,8 +132,7 @@ class RegisterRestServlet(RestServlet):
# Set the desired user according to the AS API (which uses the
# 'user' key not 'username'). Since this is a new addition, we'll
# fallback to 'username' if they gave one.
if isinstance(body.get("user"), basestring):
desired_username = body["user"]
desired_username = body.get("user", desired_username)
if isinstance(desired_username, basestring):
result = yield self._do_appservice_registration(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment