Skip to content

Commit 0c422ac

Browse files
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 ```
1 parent 60f234c commit 0c422ac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

engine/schema/src/main/java/org/apache/cloudstack/storage/datastore/db/ImageStoreDaoImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public List<ImageStoreVO> findByZone(ZoneScope scope, Boolean readonly) {
130130
}
131131
if (scope.getScopeId() != null) {
132132
SearchCriteria<ImageStoreVO> scc = createSearchCriteria();
133-
scc.addOr("scope", SearchCriteria.Op.EQ, ScopeType.ZONE);
133+
scc.addOr("scope", SearchCriteria.Op.EQ, ScopeType.REGION);
134134
scc.addOr("dcId", SearchCriteria.Op.EQ, scope.getScopeId());
135135
sc.addAnd("scope", SearchCriteria.Op.SC, scc);
136136
}

0 commit comments

Comments
 (0)