summary refs log tree commit diff
path: root/synapse/rest/client
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2018-07-10 13:58:01 +0100
committerMatthew Hodgson <matthew@matrix.org>2018-07-10 13:58:01 +0100
commit9d57abcadd25e9dd9244e40d88fdb5ddac6f672c (patch)
tree2d8b21d73411d94123a72be409c70579f26917e7 /synapse/rest/client
parenttweak dinsic display names (diff)
downloadsynapse-9d57abcadd25e9dd9244e40d88fdb5ddac6f672c.tar.xz
fix bounds error
Diffstat (limited to 'synapse/rest/client')
-rw-r--r--synapse/rest/client/v2_alpha/register.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py
index bfd7d30a23..b4b598a789 100644
--- a/synapse/rest/client/v2_alpha/register.py
+++ b/synapse/rest/client/v2_alpha/register.py
@@ -426,7 +426,7 @@ class RegisterRestServlet(RestServlet):
                     if org_parts[0] == "matrix" and org_parts[1] == "org":
                         org = "Tchap Admin"
                     elif org_parts[-2] == "gouv":
-                        org = org_parts[-3] or org_parts[-2]
+                        org = org_parts[-3] if len(org_parts) > 2 else org_parts[-2]
                     else:
                         org = org_parts[-2]