Update flm_workspace.py

This commit is contained in:
firestar5683
2026-08-02 20:19:22 -05:00
parent 1b9d7c5cd7
commit 428d47c918
+10 -1
View File
@@ -3417,7 +3417,16 @@ def revert_trial_profile() -> dict[str, Any]:
current_profile_id = params.get("FLMActiveProfileId", encoding="utf-8") or ""
revert_snapshot = _find_revert_snapshot(paths, snapshot if isinstance(snapshot, dict) else {}, current_profile_id, params)
if revert_snapshot is None:
raise FileNotFoundError("active trial snapshot")
params.put_bool("FLMTrialApplied", False)
params.put("FLMActiveProfileId", "")
params.put("FLMActiveOverrides", json.dumps({}, separators=(",", ":")))
_clear_persistent_trial_baseline(params)
try:
snapshot_path.unlink()
except FileNotFoundError:
pass
Params(memory=True).put_bool("StarPilotTogglesUpdated", True)
return {"message": "Recovered the incomplete FLM trial; no rollback snapshot was available.", "recovered": True}
_apply_param_bundle(params, revert_snapshot["params"])
_clear_persistent_trial_baseline(params)
try: