mirror of https://github.com/Icinga/icinga2.git
Use the right method to get the notification command
This commit is contained in:
parent
3f1b51b355
commit
7077605880
|
@ -633,7 +633,7 @@ Dictionary::Ptr ApiActions::ExecuteCommand(const ConfigObject::Ptr& object,
|
|||
if (!EventCommand::GetByName(resolved_command))
|
||||
return ApiActions::CreateResult(400, "Command '" + resolved_command + "' is not of type '" + command_type + "'.");
|
||||
} else if (command_type == "NotificationCommand") {
|
||||
if (!EventCommand::GetByName(resolved_command))
|
||||
if (!NotificationCommand::GetByName(resolved_command))
|
||||
return ApiActions::CreateResult(400, "Command '" + resolved_command + "' is not of type '" + command_type + "'.");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue