mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-08-31 01:35:56 +08:00
Merge pull request #5996 from yousong/automated-cherry-pick-of-#5995-upstream-release-3.2
Automated cherry pick of #5995: lblistener: fix updating lblistener without backend_group field
This commit is contained in:
@@ -424,7 +424,7 @@ func (lblis *SLoadbalancerListener) StartLoadBalancerListenerSyncstatusTask(ctx
|
||||
func (lblis *SLoadbalancerListener) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error) {
|
||||
ownerId := lblis.GetOwnerId()
|
||||
backendGroupV := validators.NewModelIdOrNameValidator("backend_group", "loadbalancerbackendgroup", ownerId)
|
||||
backendGroupV.AllowEmpty(true).Optional(true)
|
||||
backendGroupV.AllowEmpty(true).Default(lblis.BackendGroupId)
|
||||
if err := backendGroupV.Validate(data); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user