修复计算虚拟网卡数量sql错误

This commit is contained in:
屈轩
2019-07-25 00:40:05 +08:00
parent 28840355d6
commit ebd35cd94c
+1 -1
View File
@@ -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()
}