mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 10:32:34 +01:00
server: Fix template garbage collection cleanup (#4944)
This commit is contained in:
parent
a30d518e8a
commit
f728287aa2
@ -68,7 +68,11 @@ public class TemplateDataFactoryImpl implements TemplateDataFactory {
|
||||
|
||||
@Override
|
||||
public TemplateInfo getTemplateOnPrimaryStorage(long templateId, DataStore store, String configuration) {
|
||||
VMTemplateVO templ = imageDataDao.findById(templateId);
|
||||
VMTemplateVO templ = imageDataDao.findByIdIncludingRemoved(templateId);
|
||||
if (templ == null) {
|
||||
s_logger.error("Could not find a template with id " + templateId);
|
||||
return null;
|
||||
}
|
||||
if (store.getRole() == DataStoreRole.Primary) {
|
||||
VMTemplateStoragePoolVO templatePoolVO = templatePoolDao.findByPoolTemplate(store.getId(), templateId, configuration);
|
||||
if (templatePoolVO != null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user