diff --git a/lib/cli/repositoryutility.cpp b/lib/cli/repositoryutility.cpp index d2a36bb66..d8207635c 100644 --- a/lib/cli/repositoryutility.cpp +++ b/lib/cli/repositoryutility.cpp @@ -33,6 +33,7 @@ #include "base/debug.hpp" #include "base/objectlock.hpp" #include "base/console.hpp" +#include "base/serializer.hpp" #include #include #include @@ -246,8 +247,13 @@ bool RepositoryUtility::AddObject(const String& name, const String& type, const vattrs->Remove("import"); vattrs->Set("type", type); + Type::Ptr dtype = Type::GetByName(type); + + Object::Ptr object = dtype->Instantiate(); + Deserialize(object, vattrs, false, FAConfig); + RepositoryTypeRuleUtilities utils; - ctype->ValidateItem(name, vattrs, DebugInfo(), &utils); + ctype->ValidateItem(name, object, DebugInfo(), &utils); int warnings = 0, errors = 0;