1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

B #2540: Fixed bug after delete FILES_DS (#2550)

This commit is contained in:
juanmont 2018-10-29 14:49:51 +01:00 committed by Ruben S. Montero
parent 102a7e132d
commit fbfbfdca8c

View File

@ -2908,7 +2908,8 @@ int VirtualMachine::updateconf(VirtualMachineTemplate& tmpl, string &err)
}
else if ( context_bck != 0 && context_new != 0 )
{
string files_ds = context_bck->vector_value("FILES_DS");
string files_ds = context_bck->vector_value("FILES_DS");
string files_ds_new = context_new->vector_value("FILES_DS");
context_new = context_new->clone();
context_new->remove("FILES_DS");
@ -2929,7 +2930,7 @@ int VirtualMachine::updateconf(VirtualMachineTemplate& tmpl, string &err)
context_new = obj_template->get("CONTEXT");
if ( !files_ds.empty() )
if ( !files_ds.empty() && !files_ds_new.empty())
{
context_new->replace("FILES_DS", files_ds);
}