Updated dispatcher matching

This commit is contained in:
Trial97
2021-06-09 19:34:43 +03:00
committed by Dan Christian Bogos
parent 0682251fff
commit 3ec16fb45e
10 changed files with 165 additions and 73 deletions

View File

@@ -692,7 +692,7 @@ func (rpS *RouteService) sortedRoutesForEvent(ctx *context.Context, tnt string,
return
}
prfCount := len(rPrfs) // if the option is not present return for all profiles
if prfCountOpt, err := args.OptAsInt64(utils.OptsRouteProfilesCount); err != nil {
if prfCountOpt, err := args.OptAsInt64(utils.OptsRoutesProfilesCount); err != nil {
if err != utils.ErrNotFound { // is an conversion error
return nil, err
}

View File

@@ -2180,7 +2180,7 @@ func TestRoutesSortedForEventWithLimitAndOffset2(t *testing.T) {
Tenant: "cgrates.org",
ID: "utils.CGREvent1",
Event: map[string]interface{}{},
APIOpts: map[string]interface{}{utils.OptsRouteProfilesCount: 3},
APIOpts: map[string]interface{}{utils.OptsRoutesProfilesCount: 3},
},
}