diff --git a/data/conf/samples/preload_internal/cgrates.json b/data/conf/samples/preload_internal/cgrates.json index 7b502fadc..667a19c0a 100644 --- a/data/conf/samples/preload_internal/cgrates.json +++ b/data/conf/samples/preload_internal/cgrates.json @@ -111,14 +111,14 @@ {"tag": "Schedule", "path": "Schedule", "type": "*variable", "value": "~*req.4"}, // {"tag": "TargetType", "path": "TargetType", "type": "*variable", "value": "~*req.5"}, {"tag": "TargetIDs", "path": "Targets[<~*req.5>]", "type": "*variable", "value": "~*req.6"}, - {"tag": "ActionID", "path": "Actions.ID", "type": "*variable", "value": "~*req.7"}, - {"tag": "ActionFilterIDs", "path": "Actions.FilterIDs", "type": "*variable", "value": "~*req.8"}, - {"tag": "ActionBlocker", "path": "Actions.Blocker", "type": "*variable", "value": "~*req.9"}, - {"tag": "ActionTTL", "path": "Actions.TTL", "type": "*variable", "value": "~*req.10"}, - {"tag": "ActionType", "path": "Actions.Type", "type": "*variable", "value": "~*req.11"}, - {"tag": "ActionOpts", "path": "Actions.Opts", "type": "*variable", "value": "~*req.12"}, - {"tag": "ActionPath", "path": "Actions.Diktats.Path", "type": "*variable", "value": "~*req.13"}, - {"tag": "ActionValue", "path": "Actions.Diktats.Value", "type": "*variable", "value": "~*req.14"}, + {"tag": "ActionID", "path": "Actions[<~*req.7>].ID", "type": "*variable", "value": "~*req.7"}, + {"tag": "ActionFilterIDs", "path": "Actions[<~*req.7>].FilterIDs", "type": "*variable", "value": "~*req.8"}, + {"tag": "ActionBlocker", "path": "Actions[<~*req.7>].Blocker", "type": "*variable", "value": "~*req.9"}, + {"tag": "ActionTTL", "path": "Actions[<~*req.7>].TTL", "type": "*variable", "value": "~*req.10"}, + {"tag": "ActionType", "path": "Actions[<~*req.7>].Type", "type": "*variable", "value": "~*req.11"}, + {"tag": "ActionOpts", "path": "Actions[<~*req.7>].Opts", "type": "*variable", "value": "~*req.12"}, + {"tag": "ActionPath", "path": "Actions[<~*req.7>].Diktats.Path", "type": "*variable", "value": "~*req.13"}, + {"tag": "ActionValue", "path": "Actions[<~*req.7>].Diktats.Value", "type": "*variable", "value": "~*req.14"}, ], }, ], diff --git a/engine/actionprofile.go b/engine/actionprofile.go index 1cc1c97e1..0e1e6457e 100644 --- a/engine/actionprofile.go +++ b/engine/actionprofile.go @@ -149,7 +149,7 @@ func (aP *ActionProfile) Set(path []string, val interface{}, newBranch bool, _ s aP.Actions = append(aP.Actions, ac) } - return ac.Set(path, val, newBranch) + return ac.Set(path[1:], val, newBranch) } func (aP *APAction) Set(path []string, val interface{}, newBranch bool) (err error) {