mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
fix: 避免公有云账号统计虚拟的host数量
This commit is contained in:
@@ -748,7 +748,7 @@ func (self *SCloudaccount) GetProviderCount() (int, error) {
|
||||
|
||||
func (self *SCloudaccount) GetHostCount() (int, error) {
|
||||
subq := CloudproviderManager.Query("id").Equals("cloudaccount_id", self.Id).SubQuery()
|
||||
q := HostManager.Query().In("manager_id", subq)
|
||||
q := HostManager.Query().In("manager_id", subq).IsFalse("is_emulated")
|
||||
return q.CountWithError()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user