From 849ff8fca9c20354ce1f5c809667ccd105a81b14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Robles?= Date: Mon, 6 Jun 2022 12:27:07 +0100 Subject: [PATCH] fix updating on upsert_users (#227) --- iam/api/management/commands/upsert_users.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iam/api/management/commands/upsert_users.py b/iam/api/management/commands/upsert_users.py index 64f07b04..772f7e68 100644 --- a/iam/api/management/commands/upsert_users.py +++ b/iam/api/management/commands/upsert_users.py @@ -188,8 +188,8 @@ def handle(self, *args, **kwargs): db_user.email = user_data['email'] db_user.is_active = user_data.get('is_active', False) - db_user.is_admin = user_data.get('is_admin', False) - db_user.is_staff = user_data.get('is_admin', False) + db_user.is_superuser = user_data.get('is_superuser', False) + db_user.is_staff = user_data.get('is_staff', False) # if password is set, update it if 'password' in user_data: