Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Modify condition on empty localpart
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Barnard committed May 10, 2017
1 parent 369195c commit ccad2ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion synapse/handlers/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ccad2ed

Please sign in to comment.