make sure building template is downloaded

This commit is contained in:
Edison Su 2011-02-02 13:35:37 -05:00
parent 7cf46b5946
commit 1aff4d8a9a
1 changed files with 1 additions and 1 deletions

View File

@ -422,7 +422,7 @@ public class DownloadMonitorImpl implements DownloadMonitor {
for (VMTemplateVO template: toBeDownloaded) {
VMTemplateHostVO tmpltHost = _vmTemplateHostDao.findByHostTemplate(sshost.getId(), template.getId());
if (tmpltHost == null) {
if (tmpltHost == null || tmpltHost.getDownloadState() != Status.DOWNLOADED) {
downloadTemplateToStorage(template, sshost);
}
}