Skip to content

Commit

Permalink
write admin password if no password
Browse files Browse the repository at this point in the history
  • Loading branch information
afourmy committed Sep 27, 2019
1 parent fa19e06 commit af7f213
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eNMS/controller/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit af7f213

Please sign in to comment.