X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fmodels%2Faction_to_be_setup.go;h=2136bf6e3e9a4454af454823480e69300776a63c;hb=43c2cf01ce523b9c9c05e6defc450b9454cd2a7c;hp=3ee10a4ef308fbf61819a4690015a44b38422c4f;hpb=c79bd0e1a4fe855b06c8f8131f162d0ee4a5f9f5;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/models/action_to_be_setup.go b/pkg/models/action_to_be_setup.go index 3ee10a4..2136bf6 100644 --- a/pkg/models/action_to_be_setup.go +++ b/pkg/models/action_to_be_setup.go @@ -20,7 +20,7 @@ import ( type ActionToBeSetup struct { // action definition - ActionDefinition *ActionDefinition `json:"ActionDefinition,omitempty"` + ActionDefinition ActionDefinition `json:"ActionDefinition,omitempty"` // action ID // Required: true @@ -69,13 +69,11 @@ func (m *ActionToBeSetup) validateActionDefinition(formats strfmt.Registry) erro return nil } - if m.ActionDefinition != nil { - if err := m.ActionDefinition.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ActionDefinition") - } - return err + if err := m.ActionDefinition.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ActionDefinition") } + return err } return nil