Webhost serialize fixes (#512)
* Main: compress world type output log * WebHost: ensure plando_options is serializable to json
This commit is contained in:
parent
44638ccc1a
commit
b2e65a19a2
|
@ -50,7 +50,6 @@ def generate_api():
|
||||||
return {"text": str(results),
|
return {"text": str(results),
|
||||||
"detail": results}, 400
|
"detail": results}, 400
|
||||||
else:
|
else:
|
||||||
meta["plando_options"] = list(meta.get("plando_options", []))
|
|
||||||
gen = Generation(
|
gen = Generation(
|
||||||
options=pickle.dumps({name: vars(options) for name, options in gen_options.items()}),
|
options=pickle.dumps({name: vars(options) for name, options in gen_options.items()}),
|
||||||
# convert to json compatible
|
# convert to json compatible
|
||||||
|
|
|
@ -37,7 +37,7 @@ def get_meta(options_source: dict) -> dict:
|
||||||
"collect_mode": options_source.get("collect_mode", "disabled"),
|
"collect_mode": options_source.get("collect_mode", "disabled"),
|
||||||
"item_cheat": bool(int(options_source.get("item_cheat", 1))),
|
"item_cheat": bool(int(options_source.get("item_cheat", 1))),
|
||||||
"server_password": options_source.get("server_password", None),
|
"server_password": options_source.get("server_password", None),
|
||||||
"plando_options": plando_options
|
"plando_options": list(plando_options)
|
||||||
}
|
}
|
||||||
return meta
|
return meta
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue