From 9f8cb8dd361c066c3cc4dbe8987617d44e04e296 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sat, 13 Aug 2016 21:43:59 +0200 Subject: [PATCH] Clean up the code a bit refs #11423 --- lib/icinga/downtime.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/icinga/downtime.cpp b/lib/icinga/downtime.cpp index 24b531214..c1accacfb 100644 --- a/lib/icinga/downtime.cpp +++ b/lib/icinga/downtime.cpp @@ -200,12 +200,7 @@ bool Downtime::IsExpired(void) const bool Downtime::HasValidConfigOwner(void) const { String configOwner = GetConfigOwner(); - - if (!configOwner.IsEmpty()) { - return (GetObject("ScheduledDowntime", configOwner) != ScheduledDowntime::Ptr()); - } - - return true; + return configOwner.IsEmpty() || GetObject(configOwner); } int Downtime::GetNextDowntimeID(void)