This commit is contained in:
Manoj Kumar 2026-01-22 15:20:14 +01:00 committed by GitHub
commit b41d2195fb
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();
}
}