Vehicle: fix validation
This commit is contained in:
parent
21747236d0
commit
a6f17db502
1 changed files with 1 additions and 1 deletions
|
|
@ -141,7 +141,7 @@ func NewConfigurableFromConfig(ctx context.Context, other map[string]any) (api.V
|
|||
}
|
||||
|
||||
switch {
|
||||
case getMaxCurrent == nil && maxCurrent != nil:
|
||||
case maxCurrent == nil && getMaxCurrent != nil:
|
||||
return nil, errors.New("cannot have current without current control")
|
||||
case status == nil && maxCurrent != nil:
|
||||
return nil, errors.New("cannot have current control without status")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue