mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 11:22:55 +09:00
bug #847: User load fails if there is no template. Needs a proper onedb update method.
This commit is contained in:
1 parent
3ece499992
commit
d27d994431
1 file changed
+4
-2
+4
-2
@@ -166,11 +166,13 @@ int User::from_xml(const string& xml)
|
||||
// Get associated metadata for the user
|
||||
ObjectXML::get_nodes("/USER/TEMPLATE", content);
|
||||
|
||||
if (!content.empty())
|
||||
if (content.empty())
|
||||
{
|
||||
rc += obj_template->from_xml_node(content[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
rc += obj_template->from_xml_node(content[0]);
|
||||
|
||||
ObjectXML::free_nodes(content);
|
||||
|
||||
if (rc != 0)
|
||||
|
||||
Reference in new issue
Block a user