#12139 Fix new_agent api request
This commit is contained in:
parent
5fc3ed3338
commit
5d41cf7d04
|
@ -2014,7 +2014,7 @@ function api_set_new_agent($id_node, $thrash2, $other, $trhash3, $return=false,
|
|||
}
|
||||
|
||||
returnError('No agent alias specified');
|
||||
} else if (agents_get_agent_id($nombre_agente)) {
|
||||
} else if (agents_get_agent_id($agent->nombre())) {
|
||||
if ($message === true) {
|
||||
return 'The agent name already exists in DB.';
|
||||
}
|
||||
|
@ -2062,7 +2062,7 @@ function api_set_new_agent($id_node, $thrash2, $other, $trhash3, $return=false,
|
|||
}
|
||||
}
|
||||
|
||||
if ($return === false) {
|
||||
if ($return !== true) {
|
||||
returnData(
|
||||
'string',
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue