mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Create APIOpts if null before exporting event
This commit is contained in:
committed by
Dan Christian Bogos
parent
3471d868b6
commit
0635eb5130
@@ -85,6 +85,12 @@ func (e *RPCee) GetMetrics() (mp *utils.SafeMapStorage) {
|
||||
}
|
||||
|
||||
func (e *RPCee) PrepareMap(mp *utils.CGREvent) (interface{}, error) {
|
||||
if mp == nil {
|
||||
return nil, nil
|
||||
}
|
||||
if mp.APIOpts == nil {
|
||||
mp.APIOpts = make(map[string]interface{})
|
||||
}
|
||||
for i, v := range e.Cfg().Opts.RPCAPIOpts {
|
||||
mp.APIOpts[i] = v
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user