We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 474ef28 commit 50c4628Copy full SHA for 50c4628
server/routes/assistant.ts
@@ -56,16 +56,14 @@ export default class AssistantService {
56
});
57
58
if (
59
- !getAgentResponse ||
60
- !getAgentResponse['configuration'] ||
61
- !getAgentResponse['configuration']['agent_id']
+ !getAgentResponse || !(getAgentResponse.ml_configuration?.agent_id || getAgentResponse.configuration?.agent_id)
62
) {
63
throw new Error(
64
'Cannot get flow agent id for generating anomaly detector'
65
);
66
}
67
68
- const agentId = getAgentResponse['configuration']['agent_id'];
+ const agentId = getAgentResponse.ml_configuration?.agent_id || getAgentResponse.configuration?.agent_id;
69
70
const executeAgentResponse = await callWithRequest('ml.executeAgent', {
71
agentId: agentId,
0 commit comments