mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-15 21:29:52 +05:00
Merge branch 'master' of https://github.com/cgrates/cgrates
This commit is contained in:
@@ -28,11 +28,11 @@ import (
|
||||
|
||||
// Returns MaxUsage (for calls in seconds), -1 for no limit
|
||||
func (self *ApierV1) GetMaxUsage(usageRecord engine.UsageRecord, maxUsage *float64) error {
|
||||
out, err := engine.LoadUserProfile(usageRecord, "")
|
||||
out, err := engine.LoadUserProfile(&usageRecord, "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
usageRecord = out.(engine.UsageRecord)
|
||||
usageRecord = *(out.(*engine.UsageRecord))
|
||||
if usageRecord.TOR == "" {
|
||||
usageRecord.TOR = utils.VOICE
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ func FromMapStringString(m map[string]string, in interface{}) {
|
||||
field := v.FieldByName(fieldName)
|
||||
if field.IsValid() {
|
||||
if field.Kind() == reflect.String {
|
||||
if v.FieldByName(fieldName).String() != "" {
|
||||
if field.String() != "" && field.CanSet() {
|
||||
field.SetString(fieldValue)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user