From af7f213c0f1861b2ff6e867c0b6212253781b347 Mon Sep 17 00:00:00 2001 From: afourmy Date: Fri, 27 Sep 2019 20:58:55 +0200 Subject: [PATCH] write admin password if no password --- eNMS/controller/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eNMS/controller/base.py b/eNMS/controller/base.py index 7abc796f9..458bf0db1 100644 --- a/eNMS/controller/base.py +++ b/eNMS/controller/base.py @@ -309,7 +309,9 @@ def configure_server_id(self) -> None: ) def create_admin_user(self) -> None: - factory("User", **{"name": "admin", "password": "admin"}) + admin = factory("User", **{"name": "admin"}) + if not admin.password: + admin.password = "admin" def update_credentials(self) -> None: with open(self.path / "projects" / "spreadsheets" / "usa.xls", "rb") as file: