Fix crafty3 -4 import users

This commit is contained in:
amcmanu3 2022-06-13 15:07:12 -04:00
parent 4019f0365e
commit 8f5cdbb0c5

View File

@ -45,14 +45,21 @@ class Import3:
else:
logger.info("Cannot create duplicate Admin account...skipping.")
else:
Console.info(
"There is only one user detected. "
"Cannot create duplicate Admin account."
)
logger.info(
"There is only one user detected. "
"Cannot create duplicate Admin account."
)
if not str(json_data["username"]).lower() == "admin":
HelperUsers.add_rawpass_user(
json_data["username"], json_data["password"]
)
Console.info(f"Imported user {json_data['username']} from Crafty 3")
logger.info(f"Imported user {json_data['username']} from Crafty 3")
else:
Console.info(
"There is only one user detected. "
"Cannot create duplicate Admin account."
)
logger.info(
"There is only one user detected. "
"Cannot create duplicate Admin account."
)
def import_servers(self, json_data, controller):
# If there is only one server to import json needs to call the data differently