From b2e65a19a220afbd7051c6d4a9e1ca5b7240891f Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sat, 14 May 2022 23:05:21 +0200 Subject: [PATCH] Webhost serialize fixes (#512) * Main: compress world type output log * WebHost: ensure plando_options is serializable to json --- WebHostLib/api/generate.py | 1 - WebHostLib/generate.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/WebHostLib/api/generate.py b/WebHostLib/api/generate.py index e01514d9..faad50e1 100644 --- a/WebHostLib/api/generate.py +++ b/WebHostLib/api/generate.py @@ -50,7 +50,6 @@ def generate_api(): return {"text": str(results), "detail": results}, 400 else: - meta["plando_options"] = list(meta.get("plando_options", [])) gen = Generation( options=pickle.dumps({name: vars(options) for name, options in gen_options.items()}), # convert to json compatible diff --git a/WebHostLib/generate.py b/WebHostLib/generate.py index 00904762..d8d46037 100644 --- a/WebHostLib/generate.py +++ b/WebHostLib/generate.py @@ -37,7 +37,7 @@ def get_meta(options_source: dict) -> dict: "collect_mode": options_source.get("collect_mode", "disabled"), "item_cheat": bool(int(options_source.get("item_cheat", 1))), "server_password": options_source.get("server_password", None), - "plando_options": plando_options + "plando_options": list(plando_options) } return meta