mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-11-02 04:02:18 +08:00
Merge pull request #1167 in YUNIONIO/onecloud from ~TANGBIN/onecloud:feature/tb-add-sku-list-query-condition to release/2.7.0
* commit '9b5ca1f5a8f975372c6f890026c20aa29dc7a9fd': skus query bugfix
This commit is contained in:
@@ -184,10 +184,12 @@ func getNameAndExtId(resId string, manager db.IModelManager) (string, string, er
|
||||
}
|
||||
|
||||
_extId := ""
|
||||
if m, ok := imodel.(*db.SStandaloneResourceBase); ok {
|
||||
_extId = m.ExternalId
|
||||
if region, ok := imodel.(*SCloudregion); ok {
|
||||
_extId = region.ExternalId
|
||||
} else if zone, ok := imodel.(*SZone); ok {
|
||||
_extId = zone.ExternalId
|
||||
} else {
|
||||
return "", "", fmt.Errorf("res %s is not a standalone resource", resId)
|
||||
return "", "", fmt.Errorf("res %s not a region/zone resource", resId)
|
||||
}
|
||||
|
||||
segs = strings.Split(_extId, "/")
|
||||
|
||||
Reference in New Issue
Block a user