From 81a94a0759f0a6fa42400cc9b75a56b9874b81ce 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 391b543b9..98a65d417 100644 --- a/lib/icinga/downtime.cpp +++ b/lib/icinga/downtime.cpp @@ -369,7 +369,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 + "'")); }