diff options
Diffstat (limited to 'table')
-rw-r--r-- | table/policy.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/table/policy.go b/table/policy.go index 158d359e..675c46b2 100644 --- a/table/policy.go +++ b/table/policy.go @@ -1554,10 +1554,11 @@ func (c *RpkiValidationCondition) Set() DefinedSet { } func NewRpkiValidationConditionFromApiStruct(a int32) (*RpkiValidationCondition, error) { - if a == 0 { + if a < 1 { return nil, nil } - typ := config.RpkiValidationResultType(a) + var typ config.RpkiValidationResultType + typ = typ.FromInt(int(a)) return NewRpkiValidationCondition(typ) } |