summaryrefslogtreecommitdiffhomepage
path: root/api/grpc_server.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/grpc_server.go')
-rw-r--r--api/grpc_server.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/api/grpc_server.go b/api/grpc_server.go
index 395f3bc2..9a3146f1 100644
--- a/api/grpc_server.go
+++ b/api/grpc_server.go
@@ -1209,14 +1209,16 @@ func NewAPIStatementFromTableStruct(t *table.Statement) *Statement {
func toStatementApi(s *config.Statement) *Statement {
cs := &Conditions{}
if s.Conditions.MatchPrefixSet.PrefixSet != "" {
+ o, _ := table.NewMatchOption(s.Conditions.MatchPrefixSet.MatchSetOptions)
cs.PrefixSet = &MatchSet{
- Type: MatchType(s.Conditions.MatchPrefixSet.MatchSetOptions.ToInt()),
+ Type: MatchType(o),
Name: s.Conditions.MatchPrefixSet.PrefixSet,
}
}
if s.Conditions.MatchNeighborSet.NeighborSet != "" {
+ o, _ := table.NewMatchOption(s.Conditions.MatchNeighborSet.MatchSetOptions)
cs.NeighborSet = &MatchSet{
- Type: MatchType(s.Conditions.MatchNeighborSet.MatchSetOptions.ToInt()),
+ Type: MatchType(o),
Name: s.Conditions.MatchNeighborSet.NeighborSet,
}
}