]> granicus.if.org Git - icinga2/commitdiff
ido: Fix hostgroup members.
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 5 Aug 2013 07:09:57 +0000 (09:09 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 5 Aug 2013 07:09:57 +0000 (09:09 +0200)
lib/ido/hostgroupdbobject.cpp

index 59e954562e144ec7bb9b5bb16e0391caaeaaa46b..4632aaef60cb61a74e010d9840e64925b772d49e 100644 (file)
@@ -46,7 +46,7 @@ Dictionary::Ptr HostGroupDbObject::GetConfigFields(void) const
        Dictionary::Ptr fields = boost::make_shared<Dictionary>();
        HostGroup::Ptr group = static_pointer_cast<HostGroup>(GetObject());
 
-       fields->Set("alias", Empty);
+       fields->Set("alias", group->GetDisplayName());
 
        return fields;
 }
@@ -81,7 +81,7 @@ void HostGroupDbObject::MembersChangedHandler(void)
                        query2.Type = DbQueryInsert;
                        query2.Fields = boost::make_shared<Dictionary>();
                        query2.Fields->Set("instance_id", 0); /* DbConnection class fills in real ID */
-                       query2.Fields->Set("hostgroup_id", hg);
+                       query2.Fields->Set("hostgroup_id", DbValue::FromObjectInsertID(hg));
                        query2.Fields->Set("host_object_id", host);
                        OnQuery(query2);
                }