mirror of https://github.com/apache/cloudstack.git
server: fix issue that vm guest os type is reset after updatetemplate (#4377)
This commit is contained in:
parent
be5df8d9ed
commit
f7a3701c7a
|
|
@ -2063,6 +2063,7 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager,
|
|||
ex.addProxyObject(String.valueOf(id), "templateId");
|
||||
throw ex;
|
||||
}
|
||||
long oldGuestOSId = template.getGuestOSId();
|
||||
|
||||
verifyTemplateId(id);
|
||||
|
||||
|
|
@ -2119,7 +2120,6 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager,
|
|||
}
|
||||
|
||||
if (guestOSId != null) {
|
||||
long oldGuestOSId = template.getGuestOSId();
|
||||
GuestOSVO guestOS = _guestOSDao.findById(guestOSId);
|
||||
|
||||
if (guestOS == null) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue