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 ab51284 commit e1fb9f5
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 e1fb9f5

Please sign in to comment.