fix: avoid double counting when compute networks nic count

This commit is contained in:
rainzm
2021-07-30 20:01:19 +08:00
parent 794c3cc34e
commit 7d2fadb84c
+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
}