MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / check

Method check

app/controlplane/pkg/data/ent/group_update.go:564–574  ·  view source on GitHub ↗

check runs all checks and user-defined validators on the builder.

()

Source from the content-addressed store, hash-verified

562
563// check runs all checks and user-defined validators on the builder.
564func (_u *GroupUpdateOne) check() error {
565 if v, ok := _u.mutation.Name(); ok {
566 if err := group.NameValidator(v); err != nil {
567 return &ValidationError{Name: "name", err: fmt.Errorf(`ent: validator failed for field "Group.name": %w`, err)}
568 }
569 }
570 if _u.mutation.OrganizationCleared() && len(_u.mutation.OrganizationIDs()) > 0 {
571 return errors.New(`ent: clearing a required unique edge "Group.organization"`)
572 }
573 return nil
574}
575
576// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
577func (_u *GroupUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GroupUpdateOne {

Callers 1

sqlSaveMethod · 0.95

Calls 3

NameMethod · 0.45
OrganizationClearedMethod · 0.45
OrganizationIDsMethod · 0.45

Tested by

no test coverage detected