This commit is contained in:
Manoj Kumar 2026-01-22 09:59:55 +00:00 committed by GitHub
commit 5f09250714
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -296,6 +296,9 @@ public class TemplateDataFactoryImpl implements TemplateDataFactory {
@Override
public boolean isTemplateMarkedForDirectDownload(long templateId) {
VMTemplateVO templateVO = imageDataDao.findById(templateId);
if (templateVO == null) {
throw new CloudRuntimeException(String.format("Template not found with ID: %s", templateId));
}
return templateVO.isDirectDownload();
}
}