Webhost serialize fixes (#512)

* Main: compress world type output log

* WebHost: ensure plando_options is serializable to json
This commit is contained in:
Fabian Dill 2022-05-14 23:05:21 +02:00 committed by GitHub
parent 44638ccc1a
commit b2e65a19a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -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

View File

@ -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