mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(region): check normal type nic is null (#19729)
This commit is contained in:
@@ -1742,7 +1742,12 @@ func (h *SHost) getNetInterfacesInternal(wireId string, nicTypes []compute.TNicT
|
||||
q = q.Equals("wire_id", wireId)
|
||||
}
|
||||
if len(nicTypes) > 0 {
|
||||
q = q.In("nic_type", nicTypes)
|
||||
//q.IsNullOrEmpty()
|
||||
if ok, _ := utils.InArray(compute.NIC_TYPE_NORMAL, nicTypes); ok {
|
||||
q = q.Filter(sqlchemy.OR(sqlchemy.In(q.Field("nic_type"), nicTypes), sqlchemy.IsNull(q.Field("nic_type"))))
|
||||
} else {
|
||||
q = q.In("nic_type", nicTypes)
|
||||
}
|
||||
}
|
||||
q = q.Asc("index")
|
||||
q = q.Asc("vlan_id")
|
||||
|
||||
Reference in New Issue
Block a user