Adding requirement for Evennia password

This commit is contained in:
Stephen Meier 2021-01-22 23:03:20 -05:00
parent 95bd3a18da
commit ddbbf8b5c5

View file

@ -1424,7 +1424,7 @@ def create_superuser():
"account of the server. Email is optional and can be empty.\n"
)
from os import environ
if "EVENNIA_SUPERUSER_USERNAME" in environ:
if ("EVENNIA_SUPERUSER_USERNAME" in environ) and ("EVENNIA_SUPERUSER_PASSWORD" in environ):
from evennia.accounts.models import AccountDB
superuser = AccountDB.objects.create_superuser(os.environ.get('EVENNIA_SUPERUSER_USERNAME'),
os.environ.get('EVENNIA_SUPERUSER_EMAIL'),