mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Don't fail to remove obsolete downtimes
This commit is contained in:
parent
6347c9089d
commit
ad7495dc0e
@ -359,7 +359,7 @@ void Downtime::RemoveDowntime(const String& id, bool includeChildren, DowntimeRe
|
|||||||
|
|
||||||
String config_owner = downtime->GetConfigOwner();
|
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() +
|
BOOST_THROW_EXCEPTION(invalid_downtime_removal_error("Cannot remove downtime '" + downtime->GetName() +
|
||||||
"'. It is owned by scheduled downtime object '" + config_owner + "'"));
|
"'. It is owned by scheduled downtime object '" + config_owner + "'"));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user