Better check for the non-existance of an admin account

main
Bob Mottram 2020-10-10 17:21:05 +01:00
parent e9ca3f3deb
commit fa945479b5
1 changed files with 1 additions and 1 deletions

View File

@ -445,7 +445,7 @@ def createPerson(baseDir: str, nickname: str, domain: str, port: int,
saveToFile,
manualFollowerApproval,
password)
if noOfAccounts(baseDir) == 1:
if not getConfigParam(baseDir, 'admin'):
# print(nickname+' becomes the instance admin and a moderator')
setConfigParam(baseDir, 'admin', nickname)
setRole(baseDir, nickname, domain, 'instance', 'admin')