]> granicus.if.org Git - icinga2/commitdiff
db_ido: Add missing instance_id.
authorMichael Friedrich <michael.friedrich@netways.de>
Tue, 1 Oct 2013 15:01:51 +0000 (17:01 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Tue, 1 Oct 2013 15:01:51 +0000 (17:01 +0200)
lib/db_ido/hostdbobject.cpp
lib/db_ido/servicedbobject.cpp

index 70fcb6ecd1389e063bebfaa5bd3caacdfb9b0418..8ad6fa99323184bdac9088c1b287a86e29dfdfa9 100644 (file)
@@ -251,6 +251,7 @@ void HostDbObject::OnConfigUpdate(void)
                                Dictionary::Ptr fields_contact = boost::make_shared<Dictionary>();
                                fields_contact->Set("host_id", DbValue::FromObjectInsertID(host));
                                fields_contact->Set("contact_object_id", user);
+                               fields_contact->Set("instance_id", 0); /* DbConnection class fills in real ID */
 
                                DbQuery query_contact;
                                query_contact.Table = GetType()->GetTable() + "_contacts";
@@ -270,6 +271,7 @@ void HostDbObject::OnConfigUpdate(void)
                                Dictionary::Ptr fields_contact = boost::make_shared<Dictionary>();
                                fields_contact->Set("host_id", DbValue::FromObjectInsertID(host));
                                fields_contact->Set("contactgroup_object_id", usergroup);
+                               fields_contact->Set("instance_id", 0); /* DbConnection class fills in real ID */
 
                                DbQuery query_contact;
                                query_contact.Table = GetType()->GetTable() + "_contactgroups";
index acbe80649bc095930ecb879ee1be4231f07aabe6..c997df1b659710fd76487f2610e279552e53e836 100644 (file)
@@ -248,6 +248,7 @@ void ServiceDbObject::OnConfigUpdate(void)
                        Dictionary::Ptr fields_contact = boost::make_shared<Dictionary>();
                        fields_contact->Set("service_id", DbValue::FromObjectInsertID(service));
                        fields_contact->Set("contact_object_id", user);
+                       fields_contact->Set("instance_id", 0); /* DbConnection class fills in real ID */
 
                        DbQuery query_contact;
                        query_contact.Table = GetType()->GetTable() + "_contacts";
@@ -267,6 +268,7 @@ void ServiceDbObject::OnConfigUpdate(void)
                        Dictionary::Ptr fields_contact = boost::make_shared<Dictionary>();
                        fields_contact->Set("service_id", DbValue::FromObjectInsertID(service));
                        fields_contact->Set("contactgroup_object_id", usergroup);
+                       fields_contact->Set("instance_id", 0); /* DbConnection class fills in real ID */
 
                        DbQuery query_contact;
                        query_contact.Table = GetType()->GetTable() + "_contactgroups";