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 authored and Al2Klimov committed Sep 17, 2024
1 parent 6347c90 commit ad7495d
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 @@ -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 + "'"));
}
Expand Down

0 comments on commit ad7495d

Please sign in to comment.