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 22, 2024
1 parent feeeded commit c0e458b
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 c0e458b

Please sign in to comment.