mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix crafty3 -4 import users
This commit is contained in:
parent
4019f0365e
commit
8f5cdbb0c5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user