fix: 避免公有云账号统计虚拟的host数量

This commit is contained in:
ioito
2019-10-12 11:42:12 +08:00
parent cd27020aeb
commit 5a0faa9d21
+1 -1
View File
@@ -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()
}