mirror of https://github.com/apache/cloudstack.git
server: fix additional zones cannot be removed (#9261)
Got an exception when delete a zone ``` com.cloud.utils.exception.CloudRuntimeException: The zone cannot be deleted because there are Secondary storages in this zone ```
This commit is contained in:
parent
60f234c682
commit
0c422aca76
|
|
@ -130,7 +130,7 @@ public class ImageStoreDaoImpl extends GenericDaoBase<ImageStoreVO, Long> implem
|
|||
}
|
||||
if (scope.getScopeId() != null) {
|
||||
SearchCriteria<ImageStoreVO> scc = createSearchCriteria();
|
||||
scc.addOr("scope", SearchCriteria.Op.EQ, ScopeType.ZONE);
|
||||
scc.addOr("scope", SearchCriteria.Op.EQ, ScopeType.REGION);
|
||||
scc.addOr("dcId", SearchCriteria.Op.EQ, scope.getScopeId());
|
||||
sc.addAnd("scope", SearchCriteria.Op.SC, scc);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue