From 127e81dc75cce9adc9330ad45e4dc95f04a171fa Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Sun, 10 Jan 2016 20:00:00 +0900 Subject: policy: fix NewRpkiValidationConditionFromApiStruct() Signed-off-by: ISHIDA Wataru --- table/policy.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'table') 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) } -- cgit v1.2.3