mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Replacing IsSliceMember ,CloneStringSlice and SliceStringEqual with slices package equivalent functions
This commit is contained in:
committed by
Dan Christian Bogos
parent
6722d6b6a4
commit
5a85c119c8
@@ -20,6 +20,7 @@ package migrator
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/cgrates/cgrates/config"
|
||||
@@ -72,7 +73,7 @@ func userProfile2attributeProfile(user *v1UserProfile) (attr *engine.AttributePr
|
||||
if fieldName == "ReqType" { // old style
|
||||
fieldName = utils.RequestType
|
||||
}
|
||||
if utils.IsSliceMember(usrFltr, fieldName) {
|
||||
if slices.Contains(usrFltr, fieldName) {
|
||||
attr.FilterIDs = append(attr.FilterIDs, fmt.Sprintf("*string:~*req.%s:%s", fieldName, substitute))
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user