Use the right method to get the notification command

This commit is contained in:
Mattia Codato 2020-06-29 13:55:20 +02:00
parent 3f1b51b355
commit 7077605880
1 changed files with 1 additions and 1 deletions

View File

@ -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 + "'.");
}