From b2d335879a4257c929a008a9caf388f7822547d2 Mon Sep 17 00:00:00 2001 From: jorgepastorr Date: Tue, 5 Sep 2023 17:40:58 +0200 Subject: [PATCH] fix webappUser create user with groups dont exist --- orchestra/contrib/systemusers/backends.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/orchestra/contrib/systemusers/backends.py b/orchestra/contrib/systemusers/backends.py index 789b81ce..132c181b 100644 --- a/orchestra/contrib/systemusers/backends.py +++ b/orchestra/contrib/systemusers/backends.py @@ -812,7 +812,8 @@ class WebappUserController(ServiceController): def get_groups(self, user): groups = [] - groups = list(user.account.systemusers.exclude(username=user.username).values_list('username', flat=True)) + # groups = list(user.account.systemusers.exclude(username=user.username).values_list('username', flat=True)) + groups.append(user.account.main_systemuser.username) groups.append("webapp-systemusers") return groups