bug #847: User load fails if there is no template. Needs a proper onedb update method.

This commit is contained in:
Ruben S. Montero committed 2011-10-11 12:44:13 +02:00
1 parent 3ece499992
commit d27d994431
1 file changed
+4 -2
+4 -2
View File
@@ -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)