Merge pull request #61 in YUNIONIO/onecloud from ~QIUJIAN/onecloud:hotfix/qj-zone-capability-baremetal to release/2.0.0

* commit 'e9d437d1736f2b5289ee571199d9c6cf3d3723e9':
  zone capability的hypervisor去重
This commit is contained in:
李泽玺
2018-08-16 16:23:53 +08:00
+1 -1
View File
@@ -515,7 +515,7 @@ func (self *SZone) GetDetailsCapabilities(ctx context.Context, userCred mcclient
}
func (self *SZone) getHypervisors() []string {
q := HostManager.Query("host_type").Equals("zone_id", self.Id)
q := HostManager.Query("host_type").Equals("zone_id", self.Id).Distinct()
rows, err := q.Rows()
if err != nil {
return nil