Fix crash in DbEvents::RemoveCommentInternal()

Missing multiple queries as implemented with RemoveDowntimeInternal().

fixes #10883
This commit is contained in:
Michael Friedrich 2015-12-18 10:52:04 +01:00
parent 323b759a90
commit 9c8fdf06cf
1 changed files with 2 additions and 3 deletions

View File

@ -411,7 +411,7 @@ void DbEvents::RemoveCommentInternal(std::vector<DbQuery>& queries, const Commen
query1.WhereCriteria = new Dictionary();
query1.WhereCriteria->Set("object_id", checkable);
query1.WhereCriteria->Set("internal_comment_id", comment->GetLegacyId());
DbObject::OnQuery(query1);
queries.push_back(query1);
/* History - update deletion time for service/host */
unsigned long entry_time = static_cast<long>(comment->GetEntryTime());
@ -434,8 +434,7 @@ void DbEvents::RemoveCommentInternal(std::vector<DbQuery>& queries, const Commen
query2.WhereCriteria->Set("object_id", checkable);
query2.WhereCriteria->Set("comment_time", DbValue::FromTimestamp(entry_time));
query2.WhereCriteria->Set("instance_id", 0); /* DbConnection class fills in real ID */
DbObject::OnQuery(query2);
queries.push_back(query2);
}
/* downtimes */