From 7077605880a16514d6ad63a4173b65aede14c322 Mon Sep 17 00:00:00 2001 From: Mattia Codato Date: Mon, 29 Jun 2020 13:55:20 +0200 Subject: [PATCH] Use the right method to get the notification command --- lib/icinga/apiactions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/icinga/apiactions.cpp b/lib/icinga/apiactions.cpp index 4779e8b46..1aa356dc0 100644 --- a/lib/icinga/apiactions.cpp +++ b/lib/icinga/apiactions.cpp @@ -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 + "'."); }