mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-29 17:58:36 +08:00
Merge pull request #10602 from rainzm/automated-cherry-pick-of-#10601-upstream-release-3.7
Automated cherry pick of #10601: Fix the problem of hostwire producted by #9723
This commit is contained in:
@@ -55,7 +55,7 @@ func init() {
|
||||
type SHostwire struct {
|
||||
SHostJointsBase
|
||||
|
||||
Bridge string `width:"16" charset:"ascii" nullable:"false" list:"domain" update:"domain" create:"domain_required"`
|
||||
Bridge string `width:"64" charset:"ascii" nullable:"false" list:"domain" update:"domain" create:"domain_required"`
|
||||
// 接口名称
|
||||
Interface string `width:"16" charset:"ascii" nullable:"false" list:"domain" update:"domain" create:"domain_required"`
|
||||
// 是否是主地址
|
||||
|
||||
@@ -237,7 +237,7 @@ func (wire *SWire) getHostwireQuery() *sqlchemy.SQuery {
|
||||
}
|
||||
|
||||
func (wire *SWire) HostCount() (int, error) {
|
||||
q := wire.getHostwireQuery()
|
||||
q := HostwireManager.Query().Equals("wire_id", wire.Id).GroupBy("host_id")
|
||||
return q.CountWithError()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user