workbench-script: in legacy, lshw is a json object

This commit is contained in:
pedro 2024-11-11 02:30:30 +01:00
parent 2d0048433b
commit cf81579819
1 changed files with 1 additions and 0 deletions

View File

@ -26,6 +26,7 @@ def convert_to_legacy_snapshot(snapshot):
snapshot["settings_version"] = "No Settings Version (NaN)" snapshot["settings_version"] = "No Settings Version (NaN)"
snapshot["timestamp"] = snapshot["timestamp"].replace(" ", "T") snapshot["timestamp"] = snapshot["timestamp"].replace(" ", "T")
snapshot["data"]["smart"] = snapshot["data"]["disks"] snapshot["data"]["smart"] = snapshot["data"]["disks"]
snapshot["data"]["lshw"] = json.loads(snapshot["data"]["lshw"])
snapshot["data"].pop("disks") snapshot["data"].pop("disks")
snapshot.pop("erase") snapshot.pop("erase")