Update built-in template size in vm_template table.

This commit is contained in:
Min Chen 2013-05-13 15:45:47 -07:00
parent dafe2654b6
commit 9777e56e8e

View File

@ -305,6 +305,10 @@ public class TemplateServiceImpl implements TemplateService {
tmpltStore.setSize(tmpltInfo.getSize());
tmpltStore.setPhysicalSize(tmpltInfo.getPhysicalSize());
tmpltStore.setLastUpdated(new Date());
// update size in vm_template table
VMTemplateVO tmlpt = _templateDao.findById(tmplt.getId());
tmlpt.setSize(tmpltInfo.getSize());
_templateDao.update(tmplt.getId(), tmlpt);
if (tmpltInfo.getSize() > 0) {
long accountId = tmplt.getAccountId();