Skip to content

Commit

Permalink
Don't fail to remove obsolete downtimes
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabteab committed May 23, 2024
1 parent 4eeccce commit 81a94a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/icinga/downtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 + "'"));
}
Expand Down

0 comments on commit 81a94a0

Please sign in to comment.