FIX: fit proceed action change

Jira: [STUDIO-14689]
Change-Id: Ia6a842b5b3bd542c25e67545528b847513d533f1
(cherry picked from commit 4cd33fded68797eb3098cb359ba1708b7f0c8bee)
This commit is contained in:
hemai
2025-09-18 20:15:59 +08:00
committed by Noisyfox
parent d3bf96f067
commit 2c675b1365

View File

@@ -2994,19 +2994,20 @@ int MachineObject::parse_json(std::string tunnel, std::string payload, bool key_
if (!key_field_only)
{
if (is_studio_cmd(sequence_id) && jj.contains("command") && jj.contains("err_code") && jj.contains("result"))
if (is_studio_cmd(sequence_id) && jj.contains("command") && jj.contains("err_code"))
{
if (jj["err_code"].is_number()) { add_command_error_code_dlg(jj["err_code"].get<int>());}
}
/* proceed action*/
else if (is_studio_cmd(sequence_id) && jj.contains("command") && jj.contains("err_code") && jj.contains("err_index")) {
json action_json;
action_json["command"] = jj["command"];
action_json["err_code"] = jj["err_code"];
action_json["err_index"] = jj["err_index"];
action_json["err_ignored"] = jj.contains("err_ignored") ? jj["err_ignored"] : json::array();
add_command_error_code_dlg(jj["err_code"].get<int>(), action_json);
if (jj["err_code"].is_number())
{
json action_json;
if (jj.contains("err_index")) {
/* proceed action*/
action_json["command"] = jj["command"];
action_json["err_code"] = jj["err_code"];
action_json["err_index"] = jj["err_index"];
action_json["err_ignored"] = jj.contains("err_ignored") ? jj["err_ignored"] : json::array();
}
add_command_error_code_dlg(jj["err_code"].get<int>(), action_json);
}
}
}