]> granicus.if.org Git - icinga2/commitdiff
Fix: CLI command 'repository add' doesn't work
authorGunnar Beutner <gunnar@beutner.name>
Fri, 20 Nov 2015 14:52:11 +0000 (15:52 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Fri, 20 Nov 2015 14:53:24 +0000 (15:53 +0100)
fixes #10690

lib/cli/repositoryutility.cpp

index 53acd01fd37156300ea841f96de8f408172677ea..bcbaf1070122efcee37e6eb948bdef0f827781db 100644 (file)
@@ -233,6 +233,7 @@ bool RepositoryUtility::AddObject(const std::vector<String>& object_paths, const
        if (check_config) {
                try {
                        ConfigObject::Ptr object = static_pointer_cast<ConfigObject>(utype->Instantiate());
+                       attrs->Set("type", utype->GetName());
                        Deserialize(object, attrs, false, FAConfig);
                        object->SetName(name);