Merge pull request #2914 from Icinga/fix/api-command-ack-wo-expire
API Commands: Only send acknowledgement expire time if not null
This commit is contained in:
commit
16f9fa35c9
|
@ -179,10 +179,12 @@ class IcingaApiCommandRenderer implements IcingaCommandRendererInterface
|
|||
$data = array(
|
||||
'author' => $command->getAuthor(),
|
||||
'comment' => $command->getComment(),
|
||||
'expiry' => $command->getExpireTime(),
|
||||
'sticky' => $command->getSticky(),
|
||||
'notify' => $command->getNotify()
|
||||
);
|
||||
if ($command->getExpireTime() !== null) {
|
||||
$data['expiry'] = $command->getExpireTime();
|
||||
}
|
||||
$this->applyFilter($data, $command->getObject());
|
||||
return IcingaApiCommand::create($endpoint, $data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue