diff --git a/engine/suppliers.go b/engine/suppliers.go index 51fe63206..4fbd500fe 100644 --- a/engine/suppliers.go +++ b/engine/suppliers.go @@ -402,25 +402,17 @@ func (spS *SupplierService) sortedSuppliersForEvent(args *ArgsGetSuppliers) (sor if err != nil { return nil, err } - srtTmp := &SortedSuppliers{ - ProfileID: sortedSuppliers.ProfileID, - Sorting: sortedSuppliers.Sorting, - } - for _, s := range sortedSuppliers.SortedSuppliers { - - srtTmp.SortedSuppliers = append(srtTmp.SortedSuppliers, s) - } if args.Paginator.Offset != nil { - if *args.Paginator.Offset <= len(srtTmp.SortedSuppliers) { - srtTmp.SortedSuppliers = srtTmp.SortedSuppliers[*args.Paginator.Offset:] + if *args.Paginator.Offset <= len(sortedSuppliers.SortedSuppliers) { + sortedSuppliers.SortedSuppliers = sortedSuppliers.SortedSuppliers[*args.Paginator.Offset:] } } if args.Paginator.Limit != nil { - if *args.Paginator.Limit <= len(srtTmp.SortedSuppliers) { - srtTmp.SortedSuppliers = srtTmp.SortedSuppliers[:*args.Paginator.Limit] + if *args.Paginator.Limit <= len(sortedSuppliers.SortedSuppliers) { + sortedSuppliers.SortedSuppliers = sortedSuppliers.SortedSuppliers[:*args.Paginator.Limit] } } - return srtTmp, nil + return sortedSuppliers, nil } type ArgsGetSuppliers struct { diff --git a/utils/apitpdata.go b/utils/apitpdata.go index 9f0b7f9fa..16f36d64e 100755 --- a/utils/apitpdata.go +++ b/utils/apitpdata.go @@ -1386,7 +1386,6 @@ type TPFilter struct { type TPSupplier struct { ID string // SupplierID - SortingFilter []string FilterIDs []string AccountIDs []string RatingPlanIDs []string // used when computing price diff --git a/utils/consts.go b/utils/consts.go index d97906461..26e10e2c1 100755 --- a/utils/consts.go +++ b/utils/consts.go @@ -486,7 +486,6 @@ const ( MetaLeastCost = "*least_cost" MetaHighestCost = "*highest_cost" MetaQOS = "*qos" - MetaStatFiltered = "*stat_filtered" Weight = "Weight" Cost = "Cost" RatingPlanID = "RatingPlanID"