From 6b7194c15ae4188ba15cf12cef16467979848ba0 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Thu, 9 Jun 2022 14:57:31 -0400 Subject: [PATCH] ucsAccounts: Correctly negate `MW_` groups prefix check --- memberPlumbing/ucsAccounts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/memberPlumbing/ucsAccounts.py b/memberPlumbing/ucsAccounts.py index 782bacd..979c1d0 100755 --- a/memberPlumbing/ucsAccounts.py +++ b/memberPlumbing/ucsAccounts.py @@ -110,7 +110,9 @@ async def _main(): if re.match(GROUPS_REGEX, group) is not None and value != "" ] # groups not from this script - other_old_groups = [g for g in user.props.groups if g[3:].startswith("MW_")] + other_old_groups = [ + g for g in user.props.groups if not g[3:].startswith("MW_") + ] user.props.groups = other_old_groups + new_groups try: