mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Getting InlineAttributes by considering the full type as ID not the " * "
This commit is contained in:
@@ -1803,7 +1803,14 @@ func (dm *DataManager) GetAttributeProfile(tenant, id string, cacheRead, cacheWr
|
||||
return x.(*AttributeProfile), nil
|
||||
}
|
||||
}
|
||||
if strings.HasPrefix(id, utils.Meta) {
|
||||
isInline := false
|
||||
for typeAttr := range utils.AttrInlineTypes.Data() {
|
||||
if strings.HasPrefix(id, typeAttr) {
|
||||
isInline = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if isInline {
|
||||
attrPrfl, err = NewAttributeFromInline(tenant, id)
|
||||
} else if dm == nil {
|
||||
err = utils.ErrNoDatabaseConn
|
||||
|
||||
@@ -31,6 +31,8 @@ var (
|
||||
ItemList = NewStringSet([]string{MetaAccounts, MetaAttributes, MetaChargers, MetaDispatchers, MetaDispatcherHosts,
|
||||
MetaFilters, MetaResources, MetaStats, MetaThresholds, MetaSuppliers,
|
||||
})
|
||||
AttrInlineTypes = NewStringSet([]string{META_CONSTANT, MetaVariable, META_COMPOSED, META_USAGE_DIFFERENCE,
|
||||
MetaSum, MetaValueExponent})
|
||||
|
||||
GitLastLog string // If set, it will be processed as part of versioning
|
||||
PosterTransportContentTypes = map[string]string{
|
||||
|
||||
Reference in New Issue
Block a user