mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Merge branch 'master' of https://github.com/cgrates/cgrates
This commit is contained in:
@@ -679,7 +679,7 @@ func (ms *MongoStorage) SetRatingProfile(rp *RatingProfile, transactionID string
|
||||
func (ms *MongoStorage) RemoveRatingProfile(key, transactionID string) error {
|
||||
session, col := ms.conn(colRpf)
|
||||
defer session.Close()
|
||||
iter := col.Find(bson.M{"id": bson.RegEx{Pattern: strings.Replace(key,"*","\\*",-1) + ".*", Options: ""}}).Select(bson.M{"id": 1}).Iter()
|
||||
iter := col.Find(bson.M{"id": key}).Select(bson.M{"id": 1}).Iter()
|
||||
var result struct{ Id string }
|
||||
for iter.Next(&result) {
|
||||
if err := col.Remove(bson.M{"id": result.Id}); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user