From d5980fd0c88a3b210940337029e3c1f579ee7833 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