From cda7b59a12bd9153f0430d16cfef7b0c7143a0bb Mon Sep 17 00:00:00 2001 From: xithical <86810816+xithical@users.noreply.github.com> Date: Fri, 18 Mar 2022 23:06:04 -0500 Subject: [PATCH] Fix how memory args are passed in importing from 3 --- app/classes/shared/import3.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/classes/shared/import3.py b/app/classes/shared/import3.py index 593a6e25..0cb7ace5 100644 --- a/app/classes/shared/import3.py +++ b/app/classes/shared/import3.py @@ -42,11 +42,11 @@ class import3: # If there is only one server to import json needs to call the data differently if isinstance(json_data, list): for server in json_data: - new_server_id = controller.import_jar_server(server_name=server['server_name'], server_path=server['server_path'], server_jar=server['server_jar'], min_mem=int(server['memory_min']), max_mem=int(server['memory_max']), port=server['server_port']) + new_server_id = controller.import_jar_server(server_name=server['server_name'], server_path=server['server_path'], server_jar=server['server_jar'], min_mem=(int(server['memory_min'])/1000), max_mem=(int(server['memory_max'])/1000), port=server['server_port']) console.info(f"Imported server {server['server_name']}[{server['id']}] from Crafty 3 to new server id {new_server_id}") logger.info(f"Imported server {server['server_name']}[{server['id']}] from Crafty 3 to new server id {new_server_id}") else: - new_server_id = controller.import_jar_server(server_name=json_data['server_name'], server_path=json_data['server_path'], server_jar=json_data['server_jar'], min_mem=int(json_data['memory_min']), max_mem=int(json_data['memory_max']), port=json_data['server_port']) + new_server_id = controller.import_jar_server(server_name=json_data['server_name'], server_path=json_data['server_path'], server_jar=json_data['server_jar'], min_mem=(int(json_data['memory_min'])/1000), max_mem=(int(json_data['memory_max'])/1000), port=json_data['server_port']) console.info(f"Imported server {json_data['server_name']}[{json_data['id']}] from Crafty 3 to new server id {new_server_id}") logger.info(f"Imported server {json_data['server_name']}[{json_data['id']}] from Crafty 3 to new server id {new_server_id}")