fix: avoid double counting when compute networks nic count

This commit is contained in:
rainzm
2021-07-30 20:05:11 +08:00
parent c2bb195f83
commit 597f2b149d
+1
View File
@@ -187,6 +187,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
}