1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Bug: If a VMTemplate was instantiated without name, the resulting VM's template had two XML NAME attributes, one of them empty.

This commit is contained in:
Carlos Martín 2011-06-16 16:16:20 +02:00
parent d0b5c29c16
commit 34585c7402

View File

@ -201,8 +201,7 @@ int VirtualMachine::insert(SqlDB * db, string& error_str)
oss << "one-" << oid;
name = oss.str();
attr = new SingleAttribute("NAME",name);
obj_template->set(attr);
replace_template_attribute("NAME", name);
}
this->name = name;