mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 06:09:39 +08:00
@@ -467,7 +467,8 @@ func (lbr *SLoadbalancerListenerRule) AllowPerformStatus(ctx context.Context, us
|
||||
|
||||
func (lbr *SLoadbalancerListenerRule) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error) {
|
||||
backendGroupV := validators.NewModelIdOrNameValidator("backend_group", "loadbalancerbackendgroup", lbr.GetOwnerId())
|
||||
if err := backendGroupV.Optional(true).Validate(data); err != nil {
|
||||
backendGroupV.Optional(true)
|
||||
if err := backendGroupV.Validate(data); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
@@ -319,6 +319,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.Optional(true)
|
||||
if err := backendGroupV.Validate(data); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user