From e4f9e89dd583309f6b2b8d472b7bf5455560fca6 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Fri, 5 Jan 2024 13:57:32 -0500 Subject: [PATCH] membershipworks: Collapse sequential periods in ucsAccounts usernames --- membershipworks/tasks/ucsAccounts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/membershipworks/tasks/ucsAccounts.py b/membershipworks/tasks/ucsAccounts.py index d3e90ec..b4fa567 100644 --- a/membershipworks/tasks/ucsAccounts.py +++ b/membershipworks/tasks/ucsAccounts.py @@ -22,7 +22,7 @@ GROUPS_REGEX = "|".join( # A group name must start and end with a letter, number or underscore. # In between additionally spaces, dashes and dots are allowed. def sanitize_group_name(name): - sanitized_body = re.sub(r"[^0-9A-Za-z_ -.]", ".", name) + sanitized_body = re.sub(r"[^0-9A-Za-z_ -.]+", ".", name) sanitized_start_end = re.sub("^[^0-9A-Za-z_]|[^0-9A-Za-z_]$", "_", sanitized_body) return "MW_" + sanitized_start_end