Fixed get agent status on linked map

This commit is contained in:
Luis Calvo 2019-05-08 12:39:53 +02:00
parent 5b75b671aa
commit ef1149d3bb
1 changed files with 2 additions and 4 deletions

View File

@ -4094,10 +4094,8 @@ function visual_map_get_layout_status($layout_id, $status_data=[], $depth=0)
);
} else if (!empty($layout_item_data['id_agent'])) {
// Agent.
$agent_status = agents_get_status(
$layout_item_data['id_agent'],
true
);
$agent = db_get_row('tagente', 'id_agente', $layout_item_data['id_agent']);
$agent_status = agents_get_status_from_counts($agent);
$status = visual_map_translate_agent_status(
$agent_status
);