mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-30 18:23:35 +08:00
修复计算虚拟网卡数量sql错误
This commit is contained in:
@@ -215,7 +215,7 @@ func (self *SNetwork) GetEipsCount() (int, error) {
|
||||
}
|
||||
|
||||
func (self *SNetwork) GetNetworkInterfacesCount() (int, error) {
|
||||
sq := NetworkinterfacenetworkManager.Query().Equals("network_id", self.Id).Distinct().SubQuery()
|
||||
sq := NetworkinterfacenetworkManager.Query("networkinterface_id").Equals("network_id", self.Id).Distinct().SubQuery()
|
||||
return NetworkInterfaceManager.Query().In("id", sq).CountWithError()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user