Merge pull request #11761 from rainzm/scheduler/fix_network_nic_count

fix: avoid double counting when compute networks nic count
This commit is contained in:
Zexi Li
2021-07-31 11:38:23 +08:00
committed by GitHub
+1
View File
@@ -201,6 +201,7 @@ func (nm *SNetworkManager) jointNetworkCount(manager db.IModelManager, netIds []
q = filter(q)
}
q = q.AppendField(sqlchemy.COUNT("count"))
q = q.GroupBy("network_id")
return q
}