mirror of
https://github.com/element-hq/synapse
synced 2024-08-20 14:20:23 +00:00
Remember to yield: not much point testing is a deferred is not None
This commit is contained in:
parent
883aabe423
commit
a0dea6eaed
1 changed files with 2 additions and 1 deletions
|
@ -224,9 +224,10 @@ class RegisterRestServlet(RestServlet):
|
||||||
if k not in body:
|
if k not in body:
|
||||||
absent.append(k)
|
absent.append(k)
|
||||||
|
|
||||||
existingUid = self.hs.get_datastore().get_user_id_by_threepid(
|
existingUid = yield self.hs.get_datastore().get_user_id_by_threepid(
|
||||||
'email', body['email']
|
'email', body['email']
|
||||||
)
|
)
|
||||||
|
|
||||||
if existingUid is not None:
|
if existingUid is not None:
|
||||||
raise SynapseError(400, "Email is already in use", Codes.THREEPID_IN_USE)
|
raise SynapseError(400, "Email is already in use", Codes.THREEPID_IN_USE)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue