mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-09 06:31:02 +00:00
action length test
This commit is contained in:
parent
fb7e1091b5
commit
64ed6f7815
1 changed files with 1 additions and 3 deletions
|
|
@ -278,9 +278,7 @@ func (i *InputDefinitionInfo) Validate(columnLabel string) error {
|
|||
|
||||
// Validate columnLabel and duplicate primaryKey.
|
||||
for _, field := range i.Fields {
|
||||
var actionCount int
|
||||
for _, action := range field.Actions {
|
||||
actionCount++
|
||||
if err := action.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -300,7 +298,7 @@ func (i *InputDefinitionInfo) Validate(columnLabel string) error {
|
|||
if field.Name != columnLabel {
|
||||
return ErrInputDefinitionColumnLabel
|
||||
}
|
||||
} else if actionCount == 0 {
|
||||
} else if len(field.Actions) == 0 {
|
||||
return ErrInputDefinitionActionRequired
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue