#11167 Adjusted the action so that the message Could not be disabled is not displayed when deleting an agent

This commit is contained in:
Jorge Rincon 2023-05-11 09:31:56 +02:00
parent ba5e3a0f08
commit c6e1b08885
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ if ($enable_agent > 0) {
);
}
if ($disable_agent > 0) {
if ($disable_agent > 0 && $agent_to_delete === 0) {
$result = db_process_sql_update('tagente', ['disabled' => 1], ['id_agente' => $disable_agent]);
$alias = io_safe_output(agents_get_alias($disable_agent));