mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: avoid double counting when compute networks nic count
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user