diff options
author | David Baker <dave@matrix.org> | 2015-08-04 16:18:17 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-08-04 16:18:17 +0100 |
commit | a0dea6eaed2315bff018f86820ed7a866ab0d2ef (patch) | |
tree | 052163f3c08c0c6e11a4666070e6a239fceaa769 /synapse/rest | |
parent | splt long line (diff) | |
download | synapse-a0dea6eaed2315bff018f86820ed7a866ab0d2ef.tar.xz |
Remember to yield: not much point testing is a deferred is not None
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/client/v2_alpha/register.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py index 93f9223708..25dab6f9c0 100644 --- a/synapse/rest/client/v2_alpha/register.py +++ b/synapse/rest/client/v2_alpha/register.py @@ -224,9 +224,10 @@ class RegisterRestServlet(RestServlet): if k not in body: 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'] ) + if existingUid is not None: raise SynapseError(400, "Email is already in use", Codes.THREEPID_IN_USE) |