ucsAccounts: Strip leading/trailing periods

This fixes a member whose name ended with "Jr."
This commit is contained in:
Adam Goldsmith 2023-01-07 14:16:22 -05:00
parent 363be0ba8c
commit 66853e1156

View File

@ -29,7 +29,7 @@ def sanitize_group_name(name):
# From an API error message: "Username must only contain numbers, letters and dots!"
def sanitize_user_name(name):
return re.sub(r"[^0-9a-z.]", ".", name.lower())
return re.sub(r"[^0-9a-z.]", ".", name.lower()).strip(".")
async def make_groups(group_mod, members):