]> granicus.if.org Git - icinga2/commitdiff
Downtime#HasValidConfigOwner(): wait for ScheduledDowntimes 6826/head
authorAlexander A. Klimov <alexander.klimov@icinga.com>
Thu, 6 Dec 2018 11:50:48 +0000 (12:50 +0100)
committerAlexander A. Klimov <alexander.klimov@icinga.com>
Thu, 6 Dec 2018 14:44:57 +0000 (15:44 +0100)
refs #6542

lib/icinga/downtime.cpp

index 336329bc2a0e0584e5e3e048498359f186702098..4180747ac94c9a1fb6f2cf6282e7967b2abce84f 100644 (file)
@@ -210,6 +210,10 @@ bool Downtime::IsExpired() const
 
 bool Downtime::HasValidConfigOwner() const
 {
+       if (!ScheduledDowntime::AllConfigIsLoaded()) {
+               return true;
+       }
+
        String configOwner = GetConfigOwner();
        return configOwner.IsEmpty() || GetObject<ScheduledDowntime>(configOwner);
 }