summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-08-04 16:18:17 +0100
committerDavid Baker <dave@matrix.org>2015-08-04 16:18:17 +0100
commita0dea6eaed2315bff018f86820ed7a866ab0d2ef (patch)
tree052163f3c08c0c6e11a4666070e6a239fceaa769 /synapse
parentsplt long line (diff)
downloadsynapse-a0dea6eaed2315bff018f86820ed7a866ab0d2ef.tar.xz
Remember to yield: not much point testing is a deferred is not None
Diffstat (limited to 'synapse')
-rw-r--r--synapse/rest/client/v2_alpha/register.py3
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)