From ccad2ed824f1601d2cc29aafe5dff6ef46668f5e Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 10 May 2017 17:34:30 +0100 Subject: [PATCH] Modify condition on empty localpart --- synapse/handlers/register.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py index dd84c5f5e9ba..ee3a2269a847 100644 --- a/synapse/handlers/register.py +++ b/synapse/handlers/register.py @@ -54,7 +54,7 @@ def check_username(self, localpart, guest_access_token=None, Codes.INVALID_USERNAME ) - if len(localpart) == 0: + if not localpart: raise SynapseError( 400, "User ID cannot be empty",