fix bounds error

This commit is contained in:
Matthew Hodgson 2018-07-10 13:58:01 +01:00
parent cb0bbde981
commit 9d57abcadd

View File

@ -426,7 +426,7 @@ class RegisterRestServlet(RestServlet):
if org_parts[0] == "matrix" and org_parts[1] == "org": if org_parts[0] == "matrix" and org_parts[1] == "org":
org = "Tchap Admin" org = "Tchap Admin"
elif org_parts[-2] == "gouv": 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: else:
org = org_parts[-2] org = org_parts[-2]