From ad7495dc0ed46f9f2b8e9da660abbd4fea91bec6 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Thu, 16 May 2024 12:19:43 +0200 Subject: [PATCH] Don't fail to remove obsolete downtimes --- lib/icinga/downtime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/icinga/downtime.cpp b/lib/icinga/downtime.cpp index 287286c7f..ec991ad31 100644 --- a/lib/icinga/downtime.cpp +++ b/lib/icinga/downtime.cpp @@ -359,7 +359,7 @@ void Downtime::RemoveDowntime(const String& id, bool includeChildren, DowntimeRe String config_owner = downtime->GetConfigOwner(); - if (!config_owner.IsEmpty() && removalReason != DowntimeExpired) { + if (!config_owner.IsEmpty() && removalReason == DowntimeRemovedByUser) { BOOST_THROW_EXCEPTION(invalid_downtime_removal_error("Cannot remove downtime '" + downtime->GetName() + "'. It is owned by scheduled downtime object '" + config_owner + "'")); }