From 0d5d71ae051fc3765cd5ceb91b7a690f6256e029 Mon Sep 17 00:00:00 2001 From: Flavio Tarsetti <flavio.tarsetti@idiap.ch> Date: Wed, 9 Aug 2017 11:29:26 +0200 Subject: [PATCH] [utils/management] in install set user 'user' profile --- beat/web/utils/management/commands/install.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/beat/web/utils/management/commands/install.py b/beat/web/utils/management/commands/install.py index c863d605a..8d10ff7da 100755 --- a/beat/web/utils/management/commands/install.py +++ b/beat/web/utils/management/commands/install.py @@ -98,6 +98,12 @@ def add_user(name, passwd, token_key): user.is_staff = True user.is_superuser = True user.save() + #set profile + user.profile.status = 'A' + user.profile.rejection_date = None + user.profile.supervision_key = None + user.profile.save() + user.save() if name == passwd: logger.info("Created user `%s' with password `%s'", name, passwd) -- GitLab