Changes on CLI -pandora_update_agent_custom_field

This commit is contained in:
Félix Suárez 2024-04-02 08:51:53 -06:00
parent a61b1a57b2
commit 42737a38a1
1 changed files with 6 additions and 1 deletions

View File

@ -3404,9 +3404,14 @@ sub cli_agent_update_custom_fields() {
}
}
if(!defined($new_value)) {
print_log "[ERROR] Error updating field '$field' no new value has been provided\n\n";
exit;
}
print_log "\n[INFO] Updating field '$field' in agent with ID '$id_agent'\n\n";
my $result = pandora_agent_update_custom_field ($dbh, $new_value, $custom_field, $id_agent);
my $result = pandora_update_agent_custom_field ($dbh, $new_value, $custom_field, $id_agent);
if($result == "0E0"){
print_log "[ERROR] Error updating field '$field'\n\n";