Skip to content

Commit

Permalink
DB IDO: Fix duplicate entries in scheduleddowntime table
Browse files Browse the repository at this point in the history
fixes #8425
  • Loading branch information
Michael Friedrich committed Feb 12, 2015
1 parent 9d97094 commit 48fa1a1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/db_ido/dbevents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,11 @@ void DbEvents::AddDowntimes(const Checkable::Ptr& checkable)

void DbEvents::AddDowntime(const Checkable::Ptr& checkable, const Downtime::Ptr& downtime)
{
/*
* make sure to delete any old downtime to avoid multiple inserts from
* configured ScheduledDowntime dumps and CreateNextDowntime() calls
*/
RemoveDowntime(checkable, downtime);
AddDowntimeInternal(checkable, downtime, false);
}

Expand Down

0 comments on commit 48fa1a1

Please sign in to comment.